Hi there!
I'm working in an application that uses .php files stored in a server. In the iPhone app user have to enter it's username and password, then send it to the server (without using Safari) and then the server returns some information in .xml format (which is received and stored by the app). This is how username and password are sent:
Code:
// check if textFields aren't empty
if (![self.txtName.text isEqualToString:@""] && ![self.txtPass.text isEqualToString:@""]) {
NSURL *url = [[NSURL alloc] initWithString:[NSString stringWithFormat:@"http://www.yourweb.com/yourfile.php?user=%@&pass=%@",self.txtName.text,self.txtPass.text]];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];
NSData *urlData;
NSURLResponse *response;
urlData = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&response error:nil];
// urlData receives the returned information and then you can process
// it by storing in a temporary file and working with NSStrings
Hope it helped!