note 30485 added to language.variables.external
| From: | vb at bertola dot eu dot org | Date: | Wed, 19 Mar 2003 15:38:56 +0000 |
| Subject: | note 30485 added to language.variables.external | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-45525@lists.php.net to get a copy of this message | ||
For what I understand, since PHP 4.3 it is possible to access the content of a POST request (or
other methods as well) as an input stream named php://input, example:
readfile("php://input");
[to display it]
or
$fp = fopen("php://input", "r");
[to open it and then do whatever you want]
This is very useful to access the content of POST requests which actually have a content (and not
just variable-value couples, which appear in $_POST).
This substitutes the old $HTTP_RAW_POST_DATA variable available in some of the previous 4.x
versions. It is available for other upload methods different from POST too, but it is not available
for POSTs with multipart/form-data content type, since the file upload handler has already taken
care of the content in that case.
--
http://www.php.net/manual/en/language.variables.external.php
http://master.php.net/manage/user-notes.php?action=edit+30485
http://master.php.net/manage/user-notes.php?action=delete+30485
http://master.php.net/manage/user-notes.php?action=reject+30485