note 20410 deleted from function.curl-setopt by cmb

From: Date: Sun, 17 Nov 2019 08:57:15 +0000
Subject: note 20410 deleted from function.curl-setopt by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-213100@lists.php.net to get a copy of this message
Note Submitter: tychay at alumni dot caltech dot edu ---- 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

« previous php.notes (#213100) next »