I am trying to get my calendar updated using php ! So far I have been able to get the auth token by sending a raw http post to the login url ! When trying to create an event in the calendar using the script below
<?php $host="66.102.7.99"; $method="post"; $path="/calendar/feeds/default/private/full"; $data="<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'> <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'></category> <title type='text'>Tennis with Beth</title> <content type='text'>Meet for a quick lesson.</content> <author> <name>Jo March</name><email>[EMAIL PROTECTED]</email> </author> <gd:transparency value='http://schemas.google.com/g/2005#event.opaque'> </gd:transparency> <gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'> </gd:eventStatus> <gd:where valueString='Rolling Lawn Courts'></gd:where> <gd:when startTime='2006-05-21T15:00:00.000Z' endTime='2006-05-21T17:00:00.000Z'></gd:when> </entry>"; $method = strtoupper($method); $fp = fsockopen('ssl://'.$host,443); echo $fp; fputs($fp,"$method $path HTTP/1.1\r\n"); fputs($fp,"Host: $host\r\n"); fputs($fp,"Content-Type: application/atom+xml\r\n"); fputs($fp,"Authorization: GoogleLogin auth= DQAAAHsAAABD9GU_8cIwLttjzqMyDXx2NsJMCp9l61RERvARDJ3yHIv5UIHWx31h1xHoTv0Jf39fMA0vuZm8ubqA_CFkuELue24f0pujT58aBi1SsZvlG0QvZQWRNulMO53t2It65tmWS3P2fHq5-IuII3UNB10Yuoglsj8qBsLtOu23pcphLg\r\n"); fputs($fp, "Content-Length: " . strlen($data) . "\r\n"); fputs($fp, "Connection: Close\r\n\r\n"); fputs($fp, $data); while (!feof($fp)) { $buf .=fgets($fp); } fclose($fp); print $buf; ?> it does give me the redirect page with the redirect url as www.google.com . How do I go about getting the sessionid , so that I can POST the same request again with the sessonid as google describes in the documentation ?? Cheers Francis Pereira ps: there maybe errors in the concept adopted by me . I am on summer break and not really an expert at this ! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
