|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-12-09 14:48 UTC] jille at hexon dot cx
Description: ------------ I think cookies would be a usable addition to the possibilities of stream-context's. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 19:00:01 2025 UTC |
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); ?>