how to upload file into server?
<p>This is my code to upload a txt file from the support files ;    </p>

<pre><code>NSString *filePath = [[NSBundle mainBundle] pathForResource:@"serverIP" ofType:@"txt"];  
    NSData *myData = [NSData dataWithContentsOfFile:filePath];  
    NSLog(@"data %@",myData);

    //url for the server
    NSString *urlString = @"http://192.168.2.111/myupload/upload.php";




    NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
    [request setURL:[NSURL URLWithString:urlString]];
    [request setHTTPMethod:@"POST"];

    NSString *boundary = [NSString stringWithString:@"-----------14737809831466499882746641449"];
    NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary];
    [request addValue:contentType forHTTPHeaderField: @"Content-Type"];

    /*
     now lets create the body of the post
     */
    NSMutableData *body = [NSMutableData data];
    [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; 
    [body appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"userfile\"; filename=\"serverIP.txt\"\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
    [body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
    [body appendData:[NSData dataWithData:myData]];
    [body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
    // setting the body of the post to the reqeust
    [request setHTTPBody:body];

    // now lets make the connection to the web
    NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
    NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];

    NSLog(@"returnString=%@",returnString);
</code></pre>

<p>This is my code to upload can anybody give me the php for this because i am facing a lot of problem .</p>

<p>no Maulik, perhaps my explanation is not enough                          let me give you an example .                                            suppose i have a file named file.txt ,whose  size is 30MB ,when i read the contain of the file it will give me all the 30MB contain.            in the  sendSynchronousRequest method i wants to give request upto 10mb  of data and aging calling the same thing unless it reaches at the last point of file .   (in brief i wants to use a loop to send the request part by part to the server )   </p>
