By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,247 Members | 871 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,247 IT Pros & Developers. It's quick & easy.

godaddy login via curl php script

P: n/a
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/com...3ec83ac55273a2

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=def ault%2Easp";
$post="UsernameTextBox=$user&PasswordTextBox=$pass &LoginImageButton.x=56&LoginImageButton.y=13&Email Enter=+Free+Email+Updates%21+Enter+address+&EmailS ub=";
$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=sec ure%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=sec ure%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,"UsernameText Box=$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=sec ure%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?

Jul 31 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.