HELP: zend xmlrpc client behind firewall/proxy

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

HELP: zend xmlrpc client behind firewall/proxy

Brent Clements-2
Hi All,
 
I have searched forums, the mailing list, and google and have come up short. I know this has to be a common issue but can't find any information on how to do it.
 
How does one utilize a zend xmlrpc client behind a firewall or proxy? How do I set my proxy settings?
 
Thanks!
BC
Reply | Threaded
Open this post in threaded view
|

Re: HELP: zend xmlrpc client behind firewall/proxy

keith Pope-4
I assume the xmlrpc will use Zend_Http therefore you should just need
to initialize the proxy adpater before you call the xmlrpc.

http://framework.zend.com/manual/en/zend.http.client.adapters.html#zend.http.client.adapters.proxy

Heres one I use:

                    Zend_Loader::loadClass( 'Zend_Http_Client' );
                    // Use the proxy if we are local people...
                    $config = array(
                        'adapter'    => 'Zend_Http_Client_Adapter_Proxy',
                        'proxy_host' => '10.1.1.1',
                        'proxy_port' => 8080
                    );

                    // Instantiate a client object -
Zend_Service_Akismet will use this
                    $client = new
Zend_Http_Client('http://rest.akismet.com', $config);
                }

                $akismet = new Zend_Service_Akismet( $wpAPIKey, $blogURL );



2008/12/4 Brent Clements <[hidden email]>:

> Hi All,
>
> I have searched forums, the mailing list, and google and have come up short.
> I know this has to be a common issue but can't find any information on how
> to do it.
>
> How does one utilize a zend xmlrpc client behind a firewall or proxy? How do
> I set my proxy settings?
>
> Thanks!
> BC



--
----------------------------------------------------------------------
[MuTe]
----------------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: HELP: zend xmlrpc client behind firewall/proxy

Brent Clements-2
Thanks, that got me started. I finally had to look in the zend source
code for the xmlrpc client to see that I could pass a pre generated
http client. Would have been nice to have that info avail in the
reference guide but hey you can't argue with free. :)


On 12/4/08, keith Pope <[hidden email]> wrote:

> I assume the xmlrpc will use Zend_Http therefore you should just need
> to initialize the proxy adpater before you call the xmlrpc.
>
> http://framework.zend.com/manual/en/zend.http.client.adapters.html#zend.http.client.adapters.proxy
>
> Heres one I use:
>
>                     Zend_Loader::loadClass( 'Zend_Http_Client' );
>                     // Use the proxy if we are local people...
>                     $config = array(
>                         'adapter'    => 'Zend_Http_Client_Adapter_Proxy',
>                         'proxy_host' => '10.1.1.1',
>                         'proxy_port' => 8080
>                     );
>
>                     // Instantiate a client object -
> Zend_Service_Akismet will use this
>                     $client = new
> Zend_Http_Client('http://rest.akismet.com', $config);
>                 }
>
>                 $akismet = new Zend_Service_Akismet( $wpAPIKey, $blogURL );
>
>
>
> 2008/12/4 Brent Clements <[hidden email]>:
>> Hi All,
>>
>> I have searched forums, the mailing list, and google and have come up
>> short.
>> I know this has to be a common issue but can't find any information on how
>> to do it.
>>
>> How does one utilize a zend xmlrpc client behind a firewall or proxy? How
>> do
>> I set my proxy settings?
>>
>> Thanks!
>> BC
>
>
>
> --
> ----------------------------------------------------------------------
> [MuTe]
> ----------------------------------------------------------------------
>

--
Sent from my mobile device