How can I access json data within a php-script, which it received via http-post? I'm doing the following on the iOS-side:
NSData *data = [NSJSONSerialization dataWithJSONObject:object options:0 error:NULL];
NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com/script.php"]];
[req setHTTPMethod:@"POST"];
[req setHTTPBody:data];
[NSURLConnection sendSynchronousRequest:req returningResponse:&response error:&err];
How do I access this data in the php-script? In other words, when I call json_decode(...)
in the php-script, what is ...
?