// Construct an HTTP POST request
$clientlogin_url = "https://www.google.com/accounts/ClientLogin";
$clientlogin_post = array(
"accountType" => "HOSTED_OR_GOOGLE",
"Email" => "yourgoogle@email.com",
"Passwd" => "yourgooglepassword",
"service" => "writely",
"source" => "your application name"
);
// Initialize the curl object
$curl = curl_init($clientlogin_url);
// Set some options (some for SHTTP)
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $clientlogin_post);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// Execute
$response = curl_exec($curl);
// Get the Auth string and save it
preg_match("/Auth=([a-z0-9_\-]+)/i", $response, $matches);
$auth = $matches[1];
echo "The auth string is: " . $auth;
// Include the Auth string in the headers
// Together with the API version being used
$headers = array(
"Authorization: GoogleLogin auth=" . $auth,
"GData-Version: 3.0",
);
// Make the request
curl_setopt($curl, CURLOPT_URL, "{Google service feed link}");
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POST, false);
$response = curl_exec($curl);
curl_close($curl);
// Parse the response
$response = simplexml_load_string($response);
echo "<pre>";
print_r($response);
echo "</pre>";
Pingback: marketing online
Pingback: best diet pills
Pingback: cheap logo design
Pingback: vivienne westwood pirate boots
Pingback: facebook of sex
Pingback: What is Wrap-Around Mortgage?
Pingback: Credit Card Debt Elimination
Pingback: Orlando real estate
Pingback: unique hoodia reviews
Pingback: sex face book
Pingback: how to talk to girls
Pingback: Italian Meet People
Pingback: Calgary Wedding Photography
Pingback: collection agency
Pingback: nose aspirator
Pingback: how to meditate properly
Pingback: Thank you!
Pingback: {Nivea coupons|Nivea coupon|Nivea printable coupon|Nivea printable coupons|Nivea discounts|Nivea discount|Nivea promo|Nivea promo code}
Pingback: collection agency newsletter
Pingback: {Cascade coupons|Cascade coupon|Cascade printable coupon|printable Cascade coupons|Cascade dishwasher detergent|Cascade discount}
Pingback: Golden Corral coupons
Pingback: Blue Buffalo printable coupons
Pingback: Stride Rite coupon
Pingback: perth child care
Pingback: graphic design perth
Pingback: network marketing
Pingback: seo australia
Pingback: wedding photographer calgary
Pingback: senuke x
Pingback: Sztabki złota is really greatproduct
Pingback: Aimane
Pingback: Contour Abs Review
Pingback: facebook of sex
Pingback: facebbok of sex
Pingback: Aboubakar
Pingback: best dating site
Pingback: Meet Girls Online Free
Pingback: Free Meet People
Pingback: 5 Panel Drug Test
Pingback: Meeting People Online For Free
Pingback: Griddle Pans
Pingback: Free Meet People Sites
Pingback: Meet Single
Pingback: amazon money machine scam
Pingback: Norwalk house painting
Pingback: argumentative topics
Pingback: Meet People Online For Free
Pingback: blogger or wordpress
Pingback: Stop Smoking Cigarettes Now!
Pingback: Para Ma