Home >Backend Development >PHP Tutorial >japanese girl wet masturbation php implementation method to obtain json data in post
Suddenly I remembered that I had used flash to transfer image binary to php, and I had an idea and used $GLOBALS['HTTP_RAW_POST_DATA'] to get it.
So I checked in depth and found that PHP only recognizes application/x-www.form-urlencoded standard data types by default. Therefore, it cannot parse content such as text/xml or soap or application/octet-stream. , if you use the $_POST array to receive it, it will fail! Therefore, the prototype is retained and handed over to $GLOBALS['HTTP_RAW_POST_DATA'] to receive it.
php's HTTP_RAW_POST_DATA
Use Content-Type=text/xml type to submit the content of an xml document to the php server. How to obtain this POST data.
The RAW / uninterpreted HTTP POST information can be accessed with: $GLOBALS['HTTP_RAW_POST_DATA'] This is useful in cases where the post Content-Type is not something PHP understands (such as text/xml).
Since PHP only recognizes application/x-www.form-urlencoded standard data type. Therefore, the content such as text/xml cannot be parsed into the $_POST array, so the prototype is retained and handed over to $GLOBALS['HTTP_RAW_POST_DATA'] to receive it.
There is also another php://input that can also implement this function.
php://input allows reading the original data of POST. It puts less pressure on memory than $HTTP_RAW_POST_DATA and does not require any special php.ini settings. php://input cannot be used with enctype="multipart/form-data".
Application
a.htm
Copy code The code is as follows:
Copy code The code is as follows:
echo file_get_contents("php://input");?>
The above introduces the implementation method of japanese girl wet masturbation php to obtain the json data in the post, including the content of japanese girl wet masturbation. I hope it will be helpful to friends who are interested in PHP tutorials.