note 26797 added to function.curl-setopt

From: Date: Wed, 13 Nov 2002 10:19:06 +0000
Subject: note 26797 added to function.curl-setopt
Groups: php.notes 
Request: Send a blank email to php-notes+get-39434@lists.php.net to get a copy of this message
About the CURLOPT_HTTPHEADER option, it took me some time to figure out how to format the so-called 'Array'. It fact, it is a list of strings. If Curl was already defining a header item, yours will replace it. Here is an example to change the Content Type in a POST: curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml")); Yann -- http://www.php.net/manual/en/function.curl-setopt.php http://master.php.net/manage/user-notes.php?action=edit+26797 http://master.php.net/manage/user-notes.php?action=delete+26797 http://master.php.net/manage/user-notes.php?action=reject+26797

« previous php.notes (#39434) next »