Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

godaddy login via curl php script

0 views
Skip to first unread message

nfh...@gmail.com

unread,
Jul 31, 2006, 5:35:41 PM7/31/06
to
I've been trying to find a solution to this for quite some time now...

I even took a look at existing scripts...

Including this one...
http://groups.google.co.uk/group/comp.lang.php/browse_thread/thread/2e052386da903425/b03ec83ac55273a2?lnk=st&q=&rnum=1#b03ec83ac55273a2

Everyone on that post seems to say its to do with the cookie's, yet if
infact they had tried this script they would have found that even with
the cookies enabled this script doesn't work.

These are my last 3 attempts:

function google_login1($user,$pass) {
$url="https://idp.godaddy.com/login.aspx?se=%2B&spkey=GDSWEB50&ci=708&target=default%2Easp";
$post="UsernameTextBox=$user&PasswordTextBox=$pass&LoginImageButton.x=56&LoginImageButton.y=13&EmailEnter=+Free+Email+Updates%21+Enter+address+&EmailSub=";
$curl = curl_init();
curl_setopt($curl,CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl,CURLOPT_POSTFIELDS, $post);
curl_setopt($curl, CURLOPT_USERAGENT,
$_SERVER['HTTP_USER_AGENT']);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl,CURLOPT_VERBOSE ,1 );
curl_setopt($curl,CURLOPT_HEADER ,1 );
curl_setopt($curl,CURLOPT_FOLLOWLOCATION, 1);
$result = curl_exec($curl);
curl_close($curl);
return $result;
}

function godaddy_login2($user,$pass) {
$curl=curl_init();
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($curl,CURLOPT_URL,"https://idp.godaddy.com/login.aspx?se=%2B&spkey=GDSWEB04&login=&target=secure%5Ftransfer%2Easp%3Furl%3D");
curl_setopt($curl,CURLOPT_RETURNTRANSFER ,1 );
curl_setopt($curl,CURLOPT_VERBOSE ,1 );
curl_setopt($curl,CURLOPT_HEADER ,1 );
curl_setopt($curl,CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl,CURLOPT_COOKIEJAR, "cookie.txt");
curl_setopt($curl,CURLOPT_COOKIEFILE, "cookie.txt");
$result="Page 1:<br>".curl_exec($curl);
curl_setopt($curl,CURLOPT_URL,"https://idp.godaddy.com/login.aspx?se=%2B&spkey=GDSWEB04&login=&target=secure%5Ftransfer%2Easp%3Furl%3D");
curl_setopt($curl,CURLOPT_POST ,1);
curl_setopt($curl,CURLOPT_REFERER,"http://www.godaddy.com/gdshop/default.asp"
);
curl_setopt($curl,CURLOPT_POSTFIELDS,"UsernameTextBox=$user&PasswordTextBox=$pass");
$result.="Page 2:<br>".curl_exec($curl);
return $result;
}

function godaddy_login3($user,$pass) {
$url="https://idp.godaddy.com/login.aspx?se=%2B&spkey=GDSWEB91&login=&target=secure%5Ftransfer%2Easp";
$vars="UsernameTextBox=$user&PasswordTextBox=$pass";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}

Any thoughts?

0 new messages