Hi I am using Zend_Http_Client with adapter Zend_Http_Client_Adapter_Curl , I tried setting REFERER using
$client = new Zend_Http_Client('http://www.example.com',array('adapter'=>'Zend_Http_Client_Adapter_Curl');
$client->getAdapter()->setCurlOption('CURLOPT_REFERER','http://www.google.com');
$client->request('POST');
echo $client->getLastRequest();
In my Request I see all kinds of header getting set except REFERER header ?? It can be done using $client->setHeaders('Referer',$url); also but I am looking for a better way. Thanks.
What is interesting about your code is that I just tried to run it and a got errors. So I could not test it. For this reason, I tried another way:
The above code results in:
So in this case it seems Referer header is set correctly.
EDIT: On the OP's request I also tested:
This also works as before.