I've been trying to get some client-server interaction happening with JSON, however, the data that I post to the server is not arriving; the $_POST
array in my PHP script is empty.
I've just ended up grabbing the WebRequest example straight from MSDN and testing that. That still doesn't work. I've also tried just posting some data with HTML form, and that works fine. I'm completely stumped.
When I call getallheaders()
in my PHP I get
OK
array(5) {
["Content-Type"]=>
string(33) "application/x-www-form-urlencoded"
["Host"]=>
string(9) "localhost"
["Content-Length"]=>
string(2) "54"
["Expect"]=>
string(12) "100-continue"
["Connection"]=>
string(10) "Keep-Alive"
though doing a var_dump($_POST) returns array(0)
Can anyone suggest anything?