Original link http://www.jb51.net/article/27312.htm
Recently, using Python to interact with PHP, Phthon the JSON data to the PHP, but in PHP $_post not get, $_request can not get, But the request information you see through Firedebug is really the post of the JSON data to PHP, what's the situation
Suddenly think of the previous contact Flash will picture binary stream to PHP, brainwave with $globals[' http_raw_post_data '] get to. The
then looked in depth, the original PHP default only recognizes the application/x-www.form-urlencoded standard data type, therefore, the type such as text/xml or soap or application/ Content such as Octet-stream can not be resolved, if you use the $_post array to receive will fail! So keep the prototype and give it to $globals[' Http_raw_post_data ') to receive it.
PHP http_raw_post_data
with the Content-type=text/xml type, submit an XML document content to the PHP server, how to get this POST data.
The raw/uninterpreted HTTP POST information can be accessed with: $GLOBALS [' http_raw_post_data '] this is Usefu L in cases where the post content-type are not something PHP understands (such as text/xml).
Because PHP is only recognized by default application /x-www.form-urlencoded the standard data type, therefore, the content of the type such as text/xml cannot be parsed into an $_post array, so the prototype is retained and given to $globals[' Http_raw_post_data ') to receive.
There is also a php://input that can implement this function
Php://input allows you to read the raw data of the POST. Compared to $HTTP _raw_post_data, it brings less pressure to memory and does not require any special php.ini settings. Php://input cannot be used for enctype= "Multipart/form-data".