View Full Version : php://input example

06-19-2005, 10:36 AM
could someone show an example of how to use the php://input wrapper? couldn't find one in the manual.

any help would be greatly appreciated.


06-19-2005, 10:51 AM

That any help?

06-21-2005, 10:16 AM
hi, thanks for your reply :)
unfortunately, this page is at the origin of my question... so unfortunately it doesn't help, but thanks anyway :)

Can something like this be done?

$roughHTTPPOST = php://input;

I hope you know what I'm trying to do now.


06-21-2005, 12:07 PM
Yeah, had a look at the page myself and couldn't really see any examples. Can't even find any on google and I've never used it before, so unfortunately can't help you :(

06-21-2005, 01:54 PM
You can use it the same way as it shows on that page for php://filter, in other words:

$roughHTTPPOST = readfile("php://input");
That works for me, anyway. Try this little script to see if it works for you:

if(!isset($_POST) || empty($_POST)) {
<form name="form1" method="post" action="">
<input type="text" name="textfield"><br />
<input type="submit" name="Submit" value="Submit">
} else {
$roughHTTPPOST = readfile("php://input");
echo $roughHTTPPOST;

06-26-2005, 04:09 PM
thank you very much :)
worked great :)