How can I access json data in php-script that it got via http-post? I am 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 php script? In other words, when I call json_decode(...)in php-script, what is it ...?
source
share