Hey guys,
I'm trying to read POST data in a PHP script.
My first instincts led me to the $_POST[] array, but for whatever reason, it's never populated.
I'm using HTTP Client for OS X, http://ditchnet.org/httpclient/ to send POST requests. I enter the URL of the script, set the method to POST, set the content-type header to text/plain and then enter myVar=foobar as the body of the request.
I hit send, and there's nothing in the $_POST[] array.
I tried another route after reading some questions here on StackOverflow, and tried reading from the $HTTP_RAW_POST_DATA
, but no dice there either.
I also tried reading from the php://input
stream, and nothing.
As a heads up, I'm able to read from the $_GET[] array if I add some parameters to the URL, but I don't want to do that.
I also need to post the data from a different application, so I can't use the HTML post forms...
Any help would be awesome, thanks guys!