Zend_Service_* through HTTP proxy


Since there isn't an example of this in the docs, it is possible to use the Zend_Service_* family of classes through a HTTP proxy, the trick is to create an instance of Zend_Http_Client first (with the proxy settings):

$proxy = new Zend_Http_Client();
     'adapter' > 'Zend_Http_Client_Adapter_Proxy',
     'proxy_host' => 'exampleproxy.domain.com',
     'proxy_port' => 8080

$amazon = new Zend_Service_Amazon('YOURAPIKEY', 'UK');

(worked out from http://framework.zend.com/issues/browse/ZF-649)

Update 15/12/2008: Code fixed.

Comments (0) Tags: amazon, zend framework

Add Comment

(Never shown on the site)

(Newlines preserved, format with Markdown)