Home  >  Article  >  Backend Development  >  japanese girl wet masturbation php implementation method to obtain json data in post

japanese girl wet masturbation php implementation method to obtain json data in post

WBOY
WBOYOriginal
2016-07-29 08:45:278035browse

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:








post.php

Copy code The code is as follows:



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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn