Hi,

I'm using Zend Framework Gbase class. I'm planning to use a proxy
before connecting to google base API but it returns an Error #111:
Connection refused.
How can fix this error?

Below is my code:

<?php
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Gbase');
Zend_Loader::loadClass('Zend_Http_Client');
Zend_Loader::loadClass('Zend_Http_Client_Adapter_Proxy');

// Parameters for ClientLogin authentication
$service = Zend_Gdata_Gbase::AUTH_SERVICE_NAME;

$config = array(
    'adapter'    => 'Zend_Http_Client_Adapter_Proxy',
    'proxy_host' => $proxy_host,
    'proxy_port' => $proxy_port
);

// A simple https request would be an attempt to authenticate via
ClientLogin
$proxiedHttpClient = new Zend_Http_Client('http://www.google.com:443',
$config);

try {
  $httpClient = Zend_Gdata_ClientLogin::getHttpClient(
      $username, $password, $service, $proxiedHttpClient);
} catch (Zend_Gdata_App_HttpException $httpException) {
  exit("An error occurred trying to connect to the proxy server\n" .
      $httpException->getMessage() . "\n");
}
?>

Error Message:
# php test_gdata.php
An error occurred trying to connect to the proxy server
Unable to Connect to tcp://XXX.YYY.ZZZ.AAA:3129. Error #111:
Connection refused

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Base Data API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-base-data-api?hl=en.

Reply via email to