コード :
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:@"http://www.yourdomain.com/script.php"];
NSString *result = (NSString *) CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)yourData, NULL, CFSTR("?=&+"), kCFStringEncodingUTF8);
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody:[result dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPMethod:@"GET"];
NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:request delegate:self];
ヒント:
myURL.com/performThisScript.php?specialID=1
URL のパラメーターを意味するため、 GET
.