Finallly the Auth token has been extracted . Manged to do this by sending a raw POST request and getting the reply . Just for old time sake if any one is intrusted I have pasted the code below. This brings me to another issue. What domain name can I register example can I register googlemobilecalendar.<some free hosting>.com ?? What are the legal implications . Or should i just keep it on a private address just for myself . Keeping it for myself is kinda Sad and a good waste of all development time .
the PHP code for obtaining the Auth token <?php $mailid=<your email id here>; $pass=<your password> $host="66.102.7.99"; $method="post"; $path="/accounts/ClientLogin"; $data="Email=". $mailid. "&Passwd=" . $pass . "&service=cl&source=calendar-lightweightmobilever-1"; $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/x-www-form-urlencoded\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; ?>
Franics Pereira Warm Summers
Rohan R. Almeida wrote:
On 5/20/06, Francis mail.francispereira@gmail.com wrote:
http://francis.byethost22.com/googlelogin.php ] . In response it sends back a Auth token which I need to place in a cookie . How on god's green earth do I extract the token !!
If its a cookie you're after, then the HTTP server would send that in the header. i.e. the "Set-Cookie" header
Once you extract the relevant cookie, the client should send that back as a "Cookie" header.