I need to POST data from inside a controller to a third party webs开发者_开发问答ite and make sure they receive my website as the HTTP_REFERER. How can I do this?
The Referer is sent as a header, simply:
$client = new Zend_Http_Client($uri);
$client->setHeaders('Referer', 'http://www.yourwebsite.com/');
$client->request(Zend_Http_Client::POST);
There's no robust way to have the client browser post some data of its own accord with an appropriate HTTP referrer.
You will have to do it from the server, using curl or a similar library.
精彩评论