ID: 27628 Updated by: [EMAIL PROTECTED] Reported By: php at virtualmonet dot com -Status: Open +Status: Bogus Bug Type: Output Control Operating System: linux PHP Version: 5CVS-2004-03-17 (dev) New Comment:
Because that's not a complete POST request. You also need to specify the correct content-type (and preferrably content-length) in the header. (You can use the header context option for this) Refer to example2 on http://www.php.net/stream if you need an example of what the headers should look like. Previous Comments: ------------------------------------------------------------------------ [2004-03-17 16:25:29] php at virtualmonet dot com Description: ------------ hi; It seems that the Context option 'content' of HTTP wrapper for stream, does not pass the value to the server. Reproduce code: --------------- // === client side php code === $opts = array('http'=>array('method'=> "POST", 'content' => 'foo=bar')); $context = stream_context_create($opts); echo file_get_contents ($url, false, $context); // === server side php code === print $_POST['foo']; Expected result: ---------------- bar ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27628&edit=1