$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.google.com/accounts/ClientLogin");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$data = array('accountType' => 'GOOGLE',
'Email' => 'emailgoeshere@gmail.com',
'Passwd' => 'passwordhere',
'source'=>'nameyourapp',
'service'=>'reader');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$loginResult = curl_exec($ch);
// this is the meat: grabbing the "Auth" value from the token we get back
$authRaw = strstr($loginResult, "Auth");
$authToken = substr($authRaw, 5);
// this builds the action we'd like the API to perform
$ch = curl_init("http://www.google.com/reader/atom/user/-/state/com.google/reading-list");
$header[] = 'Authorization: GoogleLogin auth='.$authToken;
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
$xml = curl_exec($ch);
curl_close($ch);