php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #25938 Get the entire POST data
Submitted: 2003-10-21 12:25 UTC Modified: 2003-12-15 15:34 UTC
From: nskate at chez dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5CVS-2003-10-21 (dev) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nskate at chez dot com
New email:
PHP Version: OS:

 

 [2003-10-21 12:25 UTC] 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'].


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-21 15:52 UTC] sniper@php.net
$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."
 [2003-12-15 15:34 UTC] dave@php.net
This is bogus, as sniper has said, $HTTP_RAW_POST_DATA and php://input exist for this purpose.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 07:01:33 2025 UTC