godaddy login via curl php script

godaddy login via curl php script

am 31.07.2006 23:35:41 von nfhm2k

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#b 03ec83ac55273a2

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=GDSWEB 50&ci=708&target=default%2Easp";
$post="UsernameTextBox=$user&PasswordTextBox=$pass&LoginImag eButton.x=56&LoginImageButton.y=13&EmailEnter=+Free+Email+Up dates%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:
".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/gd shop/default.asp"
);
curl_setopt($curl,CURLOPT_POSTFIELDS,"UsernameTextBox=$user& PasswordTextBox=$pass");
$result.="Page 2:
".curl_exec($curl);
return $result;
}

function godaddy_login3($user,$pass) {
$url="https://idp.godaddy.com/login.aspx?se=%2B&spkey=GDSWEB 91&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?