note 90927 modified in function.stream-context-create by danbrown
| From: | danbrown@php.net | Date: | Sat, 16 May 2009 20:25:55 +0000 |
| Subject: | note 90927 modified in function.stream-context-create by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-154677@lists.php.net to get a copy of this message | ||
In some cases, set a header option as an array, and not a string, depending on server configuration.
<?php
$opts = array(
'http'=> array(
'method'=> "GET",
'header'=> array( "Cookie: foo="bar"l ),
'user_agent'=> $_SERVER['HTTP_USER_AGENT']
)
);
?>
--was--
In some cases, set a header option as an array, and not a string, depending on server configuration.
$opts = array(
'http'=> array(
'method'=> "GET",
'header'=> array( "Cookie: foo="bar"l ),
'user_agent'=> $_SERVER['HTTP_USER_AGENT']
)
);
http://php.net/manual/en/function.stream-context-create.php