Jump to content

Login in blogger php


siddscool19

Recommended Posts

I have created a coding which can pass first step of login..

That is it logins into blogger and when it faces redirection page it opens a new page

and when i save the output i get all the redirecting page contents.......

Here are the codes for more clear understanding.....

<?php
$url="https://www.google.com/accounts/ServiceLoginAuth?service=blogger";
$email=(email id of blogger here);
$pass=(pass of blogger here);
$continue=urlencode("https://www.blogger.com/loginz?d=%2Fhome&a=ADD_SERVICE_FLAG");
$ch3 = curl_init();
    curl_setopt($ch3,CURLOPT_URL, $url);
    curl_setopt($ch3, CURLOPT_POST, 4);
    curl_setopt($ch3, CURLOPT_POSTFIELDS,"continue=$continue&service=blogger&naui=8&fpui=2&skipvpage=true&rm=false&hl=en&alwf=true&alinsu=0&Email=$email&Passwd=$pass&PersistentCookie=yes&rmShown=1&signIn=Sign+in&asts=");
    curl_setopt($ch3,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch3,CURLOPT_FOLLOWLOCATION,1);
    curl_setopt($ch3,CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch3,CURLOPT_COOKIEJAR,"cookie.txt");
curl_setopt($ch3,CURLOPT_CONNECTTIMEOUT,120);
$result1234 = curl_exec($ch3);
    curl_close($ch3);

$ch3 = curl_init();
    curl_setopt($ch3,CURLOPT_URL, "https://www.google.com/accounts/CheckCookie?continue=https%3A%2F%2Fwww.blogger.com%2Floginz%3Fd%3D%252Fhome%26a%3DADD_SERVICE_FLAG&hl=en&service=blogger&chtml=LoginDoneHtml&skipvpage=true&alinsu=0&naui=8");
    curl_setopt($ch3,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch3,CURLOPT_FOLLOWLOCATION,1);
    curl_setopt($ch3,CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch3,CURLOPT_COOKIE,1);
curl_setopt($ch3,CURLOPT_COOKIEFILE,"cookie.txt");
curl_setopt($ch3,CURLOPT_CONNECTTIMEOUT,120);
$result1234 = curl_exec($ch3);
    curl_close($ch3);
$fopen=fopen("hi.html","w");
fwrite($fopen,$result1234);
fclose($fopen);
?>

 

So how should i go further by redirection page and save the cookie of the resulting page using which I can login into blogger account completely...

 

I want to do this since I want to post on my blogger using php since it takes a lot of time for me to load the new post creator page and then enter details there so I wanted to use php..

I have no bad intensions :)

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/141069-login-in-blogger-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.