Edit report at https://bugs.php.net/bug.php?id=60482&edit=1
ID: 60482 Updated by: [email protected] Reported by: jille at hexon dot cx Summary: Add cookies to stream_context -Status: Open +Status: Not a bug Type: Feature/Change Request Package: Streams related Operating System: n/a PHP Version: Irrelevant Block user comment: N Private report: N New Comment: This can already be achieved using existing (albeit pretty low-level) functionality of the streams API: <?php $opts = array( "http" => array( "method" => "GET", "header" => "Cookie: foo=bar", ) ); $context = stream_context_create($opts); $result = file_get_contents('http://example.com/server.php', false, $context); ?> Previous Comments: ------------------------------------------------------------------------ [2011-12-11 16:18:27] [email protected] It is trivial to add cookies by adding Cookie: headers. ------------------------------------------------------------------------ [2011-12-09 14:48:07] jille at hexon dot cx Description: ------------ I think cookies would be a usable addition to the possibilities of stream-context's. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60482&edit=1
