Hi,

Yea it does seem that this is a connectivity problem.  I have found a
similar post here -

http://groups.google.com/group/youtube-api-gdata/browse_thread/thread/14fa08ea49b665f8/7cc4677bb098201f?lnk=gst&q=HttpException#7cc4677bb098201f

There is instruction posted by Jochen (Google), showing how to capture the
exception and print out the response error body.  This can help debugging
your problem.

Hope it helps,
Austin

On Tue, May 20, 2008 at 6:22 AM, WJProctor <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> For a while I have been trying to develope a PHP system that will use
> the GData API to connect to and add events to a google calendar. The
> code I have so far is.
>
>            $user = "[EMAIL PROTECTED]";
>            $pass = "xxxxxxx";
>
>            $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
>
>            $httpConfig = array(
>               'adapter'      => 'Zend_Http_Client_Adapter_Proxy',
>               'proxy_host'   => "slb-webcache.hull.ac.uk",
>               'proxy_port'   => 3128,
>            );
>
>            $client = new Zend_Http_Client("https://www.google.com";,
> $httpConfig);
>
>            $authclient = Zend_Gdata_ClientLogin::getHttpClient($user,
> $pass,$service,$client);
>
>            $gdataCal = new Zend_Gdata_Calendar();
>            $newEvent = $gdataCal->newEventEntry();
>
>            $newEvent->title = $gdataCal->newTitle($this->gettitle());
>            $newEvent->where = array($gdataCal->newWhere($this-
> >getwhere));
>            $newEvent->content = $gdataCal->newContent("\"" . $this-
> >getdescription() . "\"");
>
>            $when = $gdataCal->newWhen();
>
>            $SD = $this->geteventdate();
>
>            echo($SD->getRFCdate() . "T" . $this->geteventtime() . ":
> 00");
>            echo($SD->getRFCdate() . "T" . $this->geteventtime() . ":
> 59");
>
>            $when->startTime = $SD->getRFCdate() . "T" . $this-
> >geteventtime() . ":00";
>            $when->endTime = $SD->getRFCdate() . "T" . $this-
> >geteventtime() . ":59";
>
>            $newEvent->when = array($when);
>
>            $createdEvent = $gdataCal->insertEvent($newEvent);
>
>            echo($createdEvent->id->text);
>
> And every time I run this I get the following error.
>
> Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with
> message 'Unable to Connect to tcp://www.google.com:80. Error #10060: A
> connection attempt failed because the connected party did not properly
> respond after a period of time, or established connection failed
> because connected host has failed to respond. ' in C:\wamp\bin\php
> \php5.2.5\lib\Zend\Gdata\App.php:445 Stack trace: #0 C:\wamp\bin\php
> \php5.2.5\lib\Zend\Gdata\App.php(663): Zend_Gdata_App-
> >post(Object(Zend_Gdata_Calendar_EventEntry), 'http://www.goog...') #1
> C:\wamp\bin\php\php5.2.5\lib\Zend\Gdata\Calendar.php(156):
> Zend_Gdata_App->insertEntry(Object(Zend_Gdata_Calendar_EventEntry),
> 'http://www.goog...', 'Zend_Gdata_Cale...') #2 C:\wamp\www
> \PocketCampus(FromLive)\Classes\whatsonclass.php(216):
> Zend_Gdata_Calendar-
> >insertEvent(Object(Zend_Gdata_Calendar_EventEntry)) #3 C:\wamp\www
> \PocketCampus(FromLive)\WhatsOn\index.php(42): WhatsOn-
> >addtocalendar() #4 {main} thrown in C:\wamp\bin\php\php5.2.5\lib\Zend
> \Gdata\App.php on line 445
>
>
> The line this seems to be erroring on is $createdEvent = $gdataCal-
> >insertEvent($newEvent);
>
> Any further help would be extreamly greatful. The main problem seems
> to be that we are behind a proxy server and this might be stopping the
> communication.
>
> Kind Regards
>
> James Proctor
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar 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-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to