<? // Note: this function assumes secure=0 AuthSub tokens function getFeed($feedUri, $sessionToken) { $curl = curl_init($feedUri); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/atom+xml', 'Authorization: AuthSub token="' . trim($sessionToken) . '"' )); $response = curl_exec($curl); if (!$response) { die('Error: ' . curl_error($curl) . "\n"); } curl_close($curl); return $response; } ?>
Fetch a Google Data feed using PHP & Curl
Posted by
Eric (Google)
on
Friday, July 11, 2008
As a continuation from my last post, here's how you get a feed.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment