Hi Everyone,

I wrote a routine "postrawdata.php" for displaying HTTP raw request message.
<?php
$putdata = fopen( "php://input" , "rb" );
while(!feof( $putdata ))
echo fread($putdata, 4096 );
fclose($putdata);
?>

It works properly when using a socket program to post something to it.

But submitting from a simple HTML below will make it dead, I have tested it under
IE 6.0 and Netscape 7.0 , any suggestion is appreciate.

<body>
<form name="form1" method="post" action="postrawdata.php">
<input type="text" name="name" >
<input type="submit" name="Submit" value="Submit">
</form>
</body>

Thanks,

    Does the file display HTTP Headers in it?

    If so then maybe when you are freading it the browser is interpreting the file as an HTTP request, and maybe there is someting in there causing it to die.

      No header is display, browser just seems to wait responding data before timeout occurs.

      I think it may be PHP bug, thanks,

      William Hong

      Originally posted by juschillinnow
      Does the file display HTTP Headers in it?

      If so then maybe when you are freading it the browser is interpreting the file as an HTTP request, and maybe there is someting in there causing it to die.

        Write a Reply...