note 20410 added to function.curl-setopt
| From: | tychay at alumni dot caltech dot edu | Date: | Wed, 03 Apr 2002 06:14:27 +0000 |
| Subject: | note 20410 added to function.curl-setopt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28527@lists.php.net to get a copy of this message | ||
CURLOPT_HTTPHEADER is NOT like the -H command line switch. The command line switch adds or replaces
headers (much like the header() line in PHP, but for HTTP clients instead of servers), but the curl
extension will eliminate the headers cURL sends by default.
For instance, your Authorization, Host, Referer, Pragma, and Accept headers which are normally
written by default or by other CURLOPT_*'s.
Also, it might seem intuitive that this should accept an array hash of header->values, but this
is not the case. It accepts an array of strings of the format "Header: Value", much like
the -H command-line switch.
Hope this helps,
terry
--
http://www.php.net/manual/en/function.curl-setopt.php
http://master.php.net/manage/user-notes.php?action=edit+20410
http://master.php.net/manage/user-notes.php?action=delete+20410
http://master.php.net/manage/user-notes.php?action=reject+20410