#25938 [Opn]: Get the entire POST data
| From: | sniper@php.net | Date: | Tue, 21 Oct 2003 19:52:15 +0000 |
| Subject: | #25938 [Opn]: Get the entire POST data | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969356681@lists.php.net to get a copy of this message | ||
ID: 25938
Updated by: sniper@php.net
Reported By: nskate at chez dot com
Status: Open
-Bug Type: Feature/Change Request
+Bug Type: Documentation problem
Operating System: *
PHP Version: 5CVS-2003-10-21 (dev)
New Comment:
$HTTP_RAW_POST_DATA and preferred: php://stdin already
exist for this.
A comment from http://www.php.net/variables.external:
"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."
Previous Comments:
------------------------------------------------------------------------
[2003-10-21 12:25:04] nskate at chez dot com
Description:
------------
This whould be great if we could see all data sent by POST method in a
var like $_SERVER['CONTENT_DATA'].
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25938&edit=1