note 90969 added to function.stream-context-create

From: Date: Tue, 19 May 2009 01:31:31 +0000
Subject: note 90969 added to function.stream-context-create
Groups: php.notes 
Request: Send a blank email to php-notes+get-155708@lists.php.net to get a copy of this message
@ Brian Gottier You've got a couple typos in your code. This should work for an example of using an array for a header option in the stream context options: <?php $opts = array( 'http'=> array( 'method'=> "GET", 'header'=> array( "Cookie: foo=bar" ), 'user_agent'=> $_SERVER['HTTP_USER_AGENT'] ) ); ?> From my experience, I have only had to do this when php is compiled --with-curlwrappers, but I guess there may be other possibilities. ---- Server IP: 209.41.74.194 Probable Submitter: 173.60.129.227 ---- Manual Page -- http://www.php.net/manual/en/function.stream-context-create.php Edit -- https://master.php.net/note/edit/90969 Del: integrated -- https://master.php.net/note/delete/90969/integrated Del: useless -- https://master.php.net/note/delete/90969/useless Del: bad code -- https://master.php.net/note/delete/90969/bad+code Del: spam -- https://master.php.net/note/delete/90969/spam Del: non-english -- https://master.php.net/note/delete/90969/non-english Del: in docs -- https://master.php.net/note/delete/90969/in+docs Del: other reasons-- https://master.php.net/note/delete/90969 Reject -- https://master.php.net/note/reject/90969 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#155708) next »