Send data to server with GET

Posted by coderjoe on Stack Overflow See other posts from Stack Overflow or by coderjoe
Published on 2012-06-10T16:36:42Z Indexed on 2012/06/10 16:39 UTC
Read the original article Hit count: 177

Filed under:
|
|
|

I have made a site where all my highscores from my game are shown. I send the scores from my iphone game to my site using a script made with php. The script works, because if I enter the link produced by my app in my browser the score is added.

However I want to send the scores from my app. The script is using the GET method to get name, scores etcetera.

This is what i have now:

 NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString]];
NSError * e;
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:&e];

But it's not sending data to my server. The urlString is correct, because if I enter the link produced by my app in my browser the score is added.

How can i solve this problem,

Thanks in advance

© Stack Overflow or respective owner

Related posts about php

Related posts about iphone