I have this question after reading the answer here, what’s the difference at all?
Is it possible to submit raw POST with html ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
We can divide form submissions in three cases:
application/x-www-form-urlencodedmultipart/form-dataIn cases 1 and 3,
$HTTP_RAW_POST_DATAcontains the raw post data (except if the option isalways_populate_raw_post_datais set tofalse, in which case$HTTP_RAW_POST_DATAis empty in case 1), i.e., the data exactly as the client (usually the browser) has sent it. In case, 1, the data has a form such asPHP automatically parses this, so that
$_POSTbecomes:The contents of the raw data can also be access through
php://input, even in case 1 whenalways_populate_raw_post_datais set tofalse. In particular,file_get_contents("php://input")gives the same data$HTTP_RAW_POST_DATAhas or would have.In case 3, in which the POST data is arbitrary,
$_POSTwill be an empty array and$HTTP_RAW_POST_DATAwill always be populated.Case 2 is a special one. In that case, PHP will parse the data and
$_POSTwill get the content of the fields which are not uploaded files, butphp://inputand$HTTP_RAW_POST_DATAwill be unavailable.