I need to POST data from inside a controller to a third party website and make sure they receive my website as the HTTP_REFERER. How can I do this?
A:
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.
Victor Nicollet
2010-10-25 14:49:16
He was talking about doing it from the server
pharalia
2010-10-25 14:52:45
@pharalia : the "redirect" in the title made me suspect he wanted to tell the client to do it.
Victor Nicollet
2010-10-25 14:56:43
+3
A:
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);
David Caunt
2010-10-25 14:56:00