473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

godaddy login via curl php script

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
0 5837

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: bryce21 | last post by:
I'm trying to write a script that logs into Yahoo Fantasy Football. Once logged in, I'll be able to grab stats and various other pieces of info about our league. The problem I'm having deals with...
3
by: Hans | last post by:
Hi everybody, I am desperately trying to log into my account at godaddy.com with PHP and Curl and just cannot make it happen. Has anybody written a script for this purpose? Here is what I...
6
by: joe t. | last post by:
The subject may sound a little cryptic, so i'll try my best to explain. Details are unavailable, as i am under a nondisclosure agreement, but i'm looking for general principles and tips, not...
4
by: Terry | last post by:
I'm using curl to invoke a php script on the same site/server. It works great, but if I call it again while it's still running, nothing happens. Why? Can that be fixed? Why use curl? To make...
7
by: Andrea | last post by:
Hi there! I have to do a php script that daily surf a webpage (I do it with crontab) and collect some data. The proble is that to access that webpage I have to do a login. I have the login data,...
1
by: GeoffreyF67 | last post by:
There is a social bookmarking site here: http:// onlywire.com that I'm trying to login and post to via curl. It's using ajax and I haven't been able to figure out how to post to it so far. ...
4
by: adam.waterfield | last post by:
I am just wondering if anyone here can help with a problem that we have here. We have a PHP based website/application that has a user login that is connected to our AD setup. This works fine....
0
by: joselegido | last post by:
Hello I'm trying to loging into OWA with curl but i have time out error. I copy this code: $ch = curl_init(); curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($ch,...
3
by: buzz2050 | last post by:
Hi all, I am using cURL for the first time. I need to login to a site and my cURL code to do the same is as follows: //curlScript.php <?php function getContent($url, $referer,...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.