Jeff! good news I was able to connect with no errors, but I have run
into one more problem. I read in some blogs that you are suppose to
specify the calendar  where it says insert event. But I have tried
with no avail. Am I suppose to use the public or private xml calendar
address? This is what I'm doing:

require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');

$email = '******';
$passwd = '*****';


$client = new Zend_Http_Client('https://www.google.com', array(
       'adapter'      => 'Zend_Http_Client_Adapter_Proxy',
       'proxy_host'   => 'proxy.shr.secureserver.net',
       'proxy_port'   => 3128
));


$clientLoginClient = Zend_Gdata_ClientLogin::getHttpClient($email,
$passwd, Zend_Gdata_Calendar::AUTH_SERVICE_NAME, $client);

function createEvent ($client, $title = 'Tennis with Beth',
    $desc='Meet for a quick lesson', $where = 'On the courts',
    $startDate = '2008-07-20', $startTime = '10:00',
    $endDate = '2008-07-20', $endTime = '11:00', $tzOffset = '-08')
{
  $gdataCal = new Zend_Gdata_Calendar($client);
  $newEvent = $gdataCal->newEventEntry();

  $newEvent->title = $gdataCal->newTitle($title);
  $newEvent->where = array($gdataCal->newWhere($where));
  $newEvent->content = $gdataCal->newContent("$desc");

  $when = $gdataCal->newWhen();
  $when->startTime = "{$startDate}T{$startTime}:00.000{$tzOffset}:00";
  $when->endTime = "{$endDate}T{$endTime}:00.000{$tzOffset}:00";
  $newEvent->when = array($when);




  // Upload the event to the calendar server
  // A copy of the event as it is recorded on the server is returned
  $createdEvent = $gdataCal->insertEvent($newEvent, 'http://
www.google.com/calendar/feeds/ilmdu8uv6gp4cam902545iduno%40group.calendar.google.com/private-b758afcca9b0d952fcabbe0bfcd7d522/basic');
  return $createdEvent->id->text;
}

On Jul 9, 4:46 pm, "Jeff Fisher (Google)" <[EMAIL PROTECTED]>
wrote:
> Hmm where you specify the service name for Calendar looks a little
> suspect. Maybe try:
>
> $clientLoginClient = Zend_Gdata_ClientLogin::getHttpClient($email,
> $passwd, Zend_Gdata_Calendar::AUTH_SERVICE_NAME, $client);
>
> -Jeff
>
> On Jul 9, 12:07 pm, giovanni <[EMAIL PROTECTED]> wrote:
>
> > I'm almost there, I think. Sorry Jeff for all the calls for help. I am
> > now getting this error:
>
> > Fatal error: Uncaught exception 'Zend_Gdata_App_AuthException' with
> > message 'Authentication with Google failed. Reason: BadAuthentication'
> > in /home/content/g/i/o/giovannimanzur/html/Zend/Gdata/ClientLogin.php:
> > 165 Stack trace: #0 /home/content/g/i/o/giovannimanzur/html/
> > reservation_calendar2.php(57):
> > Zend_Gdata_ClientLogin::getHttpClient('[EMAIL PROTECTED]', 'rca*****',
> > 'Zend_Gdata_Cale...', Object(Zend_Http_Client)) #1 {main} thrown in /
> > home/content/g/i/o/giovannimanzur/html/Zend/Gdata/ClientLogin.php on
> > line 165
>
> > This is what I am doing:
>
> > require_once 'Zend/Loader.php';
> > Zend_Loader::loadClass('Zend_Gdata');
> > Zend_Loader::loadClass('Zend_Gdata_AuthSub');
> > Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
> > Zend_Loader::loadClass('Zend_Gdata_Calendar');
>
> > $email = '[EMAIL PROTECTED]';
> > $passwd = 'rcap***';
>
> > $client = new Zend_Http_Client('https://www.google.com', array(
> >        'adapter'      => 'Zend_Http_Client_Adapter_Proxy',
> >        'proxy_host'   => 'proxy.shr.secureserver.net',
> >        'proxy_port'   => 3128
> > ));
>
> > $clientLoginClient = Zend_Gdata_ClientLogin::getHttpClient($email,
> > $passwd, 'Zend_Gdata_Calendar::AUTH_SERVICE_NAME;', $client);
>
> > On Jul 8, 5:27 pm, "Jeff Fisher (Google)" <[EMAIL PROTECTED]>
> > wrote:
>
> > > Hi,
>
> > > Sorry, I think I confused the matter by showing both AuthSub and
> > > ClientLogin. You can remove the line:
>
> > > $sessionToken =
> > > Zend_Gdata_AuthSub::getAuthSubSessionToken($singleUseToken, $client);
>
> > > Cheers,
> > > -Jeff
>
> > > On Jul 7, 5:31 pm, giovanni <[EMAIL PROTECTED]> wrote:
>
> > > > I tried it, I am getting a new error. I'm not sure if I'm doing what
> > > > you said to try properly. This is what I am doing:
>
> > > > require_once 'Zend/Loader.php';
> > > > Zend_Loader::loadClass('Zend_Gdata');
> > > > Zend_Loader::loadClass('Zend_Gdata_AuthSub');
> > > > Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
> > > > Zend_Loader::loadClass('Zend_Gdata_Calendar');
>
> > > > $email = '[EMAIL PROTECTED]';
> > > > $passwd = '******';
>
> > > > $client = new Zend_Http_Client('https://www.google.com', array(
> > > >        'adapter'      => 'Zend_Http_Client_Adapter_Proxy',
> > > >        'proxy_host'   => 'proxy.shr.secureserver.net',
> > > >        'proxy_port'   => 3128
> > > > ));
>
> > > > $sessionToken =
> > > > Zend_Gdata_AuthSub::getAuthSubSessionToken($singleUseToken, $client);
>
> > > > $clientLoginClient = Zend_Gdata_ClientLogin::getHttpClient($email,
> > > > $passwd, 'Zend_Gdata_Calendar::AUTH_SERVICE_NAME;', $client);
>
> > > > This is the error I am getting:
>
> > > > Fatal error: Uncaught exception 'Zend_Gdata_App_AuthException' with
> > > > message 'Token upgrade failed. Reason: <HTML> <HEAD> <TITLE>Invalid
> > > > AuthSub token.</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
> > > > <H1>Invalid AuthSub token.</H1> <H2>Error 403</H2> </BODY> </HTML> '
> > > > in /home/content/g/i/o/giovannimanzur/html/Zend/Gdata/AuthSub.php:117
> > > > Stack trace: #0 /home/content/g/i/o/giovannimanzur/html/
> > > > reservation_calendar2.php(56):
> > > > Zend_Gdata_AuthSub::getAuthSubSessionToken(NULL,
> > > > Object(Zend_Http_Client)) #1 {main} thrown in /home/content/g/i/o/
> > > > giovannimanzur/html/Zend/Gdata/AuthSub.php on line 117
>
> > > > On Jul 7, 7:16 pm, giovanni <[EMAIL PROTECTED]> wrote:
>
> > > > > Sorry, wrong question. Thanks for the help I am going to try it out
> > > > > with client login.
>
> > > > > On Jul 7, 7:09 pm, giovanni <[EMAIL PROTECTED]> wrote:
>
> > > > > > So that means I will be unable to use Client login?
>
> > > > > > On Jul 3, 1:37 pm, "Jeff Fisher (Google)" <[EMAIL PROTECTED]>
> > > > > > wrote:
>
> > > > > > > Hi,
>
> > > > > > > Yes, GoDaddy makes you go through their proxy server if you are 
> > > > > > > trying
> > > > > > > to connect to a SSL endpoint. Digging up some old code that got 
> > > > > > > around
> > > > > > > it for AuthSub:
>
> > > > > > > $client = new Zend_Http_Client('https://www.example.com/', array(
> > > > > > >        'adapter'      => 'Zend_Http_Client_Adapter_Proxy',
> > > > > > >        'proxy_host'   => 'proxy.shr.secureserver.net',
> > > > > > >        'proxy_port'   => 3128
> > > > > > > ));
>
> > > > > > > $sessionToken =
> > > > > > > Zend_Gdata_AuthSub::getAuthSubSessionToken($singleUseToken, 
> > > > > > > $client);
>
> > > > > > > It looks like a similar thing can be done with ClientLogin (given 
> > > > > > > the
> > > > > > > above definition of $client):
>
> > > > > > > $clientLoginClient = Zend_Gdata_ClientLogin::getHttpClient($email,
> > > > > > > $passwd, 'cl', $client);
>
> > > > > > > Of course instead of 'cl' you'd have the service name for 
> > > > > > > whichever
> > > > > > > API you are trying to work with.
>
> > > > > > > Cheers,
> > > > > > > -Jeff
>
> > > > > > > On Jul 3, 10:13 am, giovanni <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > I'm not too sure. I host through Godaddy and I am under shared
> > > > > > > > hosting.
>
> > > > > > > > On Jul 2, 5:10 pm, "Jeff Fisher (Google)" <[EMAIL PROTECTED]>
> > > > > > > > wrote:
>
> > > > > > > > > Hi,
>
> > > > > > > > > It looks like your PHP server is unable to connect 
> > > > > > > > > tohttps://www.google.com.
> > > > > > > > > Is it behind a firewall or somehow prohibited from making 
> > > > > > > > > outbound SSL
> > > > > > > > > connections?
>
> > > > > > > > > Cheers,
> > > > > > > > > -Jeff
>
> > > > > > > > > On Jul 1, 11:26 am, giovanni <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > I'm getting this error:
>
> > > > > > > > > > Fatal error: Uncaught exception 
> > > > > > > > > > 'Zend_Gdata_App_HttpException' with
> > > > > > > > > > message 'Unable to Connect to ssl://www.google.com:443. 
> > > > > > > > > > Error #110:
> > > > > > > > > > Connection timed out' in 
> > > > > > > > > > /home/content/g/i/o/giovann*******/html/Zend/
> > > > > > > > > > Gdata/ClientLogin.php:129 Stack trace: #0 
> > > > > > > > > > /home/content/g/i/o/
> > > > > > > > > > giovanni******/html/reservation_calendar.php(51):
> > > > > > > > > > Zend_Gdata_ClientLogin::getHttpClient('[EMAIL PROTECTED]', 
> > > > > > > > > > '******',
> > > > > > > > > > 'cl') #1 {main} thrown in 
> > > > > > > > > > /home/content/g/i/o/giovann*******/html/Zend/
> > > > > > > > > > Gdata/ClientLogin.php on line 129
>
> > > > > > > > > > Any clues or tips.
>
> > > > > > > > > > I just started messing around with API, could really use 
> > > > > > > > > > some help. I
> > > > > > > > > > added the *** to block sensitive information.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Data Protocol" 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-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to