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 tried but the result is always the login page.
$curl=curl_init();
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
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, "-");
curl_setopt($curl,CURLOPT_COOKIEFILE, "");
$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
,"UsernameTextBox=OWNUSERID&PasswordTextBox=OWNPAS S");
$result.="Page 2:<br>".curl_exec($curl);
Many thanks for any help, hints or ideas.
Hans 3 5033
*** Hans wrote/escribió (8 May 2005 22:12:46 -0700): curl_setopt($curl,CURLOPT_COOKIEJAR, "-"); curl_setopt($curl,CURLOPT_COOKIEFILE, "");
I'm not an expert in curl but... What's the purpose of these previous
lines? Discarding cookies? I'm pretty sure you do need cookies in order to
store the session ID value.
--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Hans wrote: 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 tried but the result is always the login page.
Have you used Firefox/Mozilla's "Live HTTP Headers" to log a normal
browsing session? That's usually what I use as the basis of any
CURL-based PHP script I write. What I usually do is clear any cookies or
cached files for the given domain, turn on the HTTP logging, browse
through as I want the CURL script to do and save the resulting logfile
near my script as a reference. Since everything that the site and your
browser are "saying" to each other is in those headers, it gives you a
pretty clear picture of what's going on and will show you any headers
the site may be expecting to get, but your CURL script isn't sending.
J Wynia
Myriad Intellect, Inc.
"Web technology that earns its keep." www.myriadintellect.com
Hans, curl_setopt($curl,CURLOPT_COOKIEJAR, "-"); curl_setopt($curl,CURLOPT_COOKIEFILE, "");
In addition you should set the cookiejar and files. It does not
automatically create one for you and the file already must be in place.
I am almost positive that GoDaddy sends a cookie so you might want to
make sure that is in place.
Mike This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Haluk Durmus |
last post by:
Hello
I checked out openssl,mm,apr,apr-util,apache 2,curl,libxml and php
from cvs.
php couse an ERROR
I did the following steps:
|
by: Chris Fortune |
last post by:
# uname -a
Linux stargate.mxc-online.net 2.4.20-021stab022.2.777-smp #1 SMP Wed Jul 28
17:12:37
MSD 2004 i686 i686 i386 GNU/Linux
I recompiled PHP with mcrypt, openssl, and curl
phpinfo():...
|
by: Dale |
last post by:
I'm (trying) to help a friend setup a MySQL db and use some simple
scripts on a site hosted with GoDaddy. I note that GoDaddy appears to
use Microsoft. I have done this:
$connection =...
|
by: d2005\\ |
last post by:
I have a site hosted on GoDaddy's shared platorm.
I am trying to read XML from the yahoo RSS feed using the
HttpWebRequest.GetResponse method and am getting a "401 access denied"
exception.
I...
|
by: nfhm2k |
last post by:
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......
|
by: apinti |
last post by:
Here is my code, and the problem:
$st="...(string to post is formed from different variables read from
file)...";
$lngth=strlen($st);
$ch = curl_init();
curl_setopt($ch,...
|
by: zorro |
last post by:
Hello there,
I can't figure out why is it that when i use an array for my postfields
it doesn't work :
this works
curl_setopt($curl, CURLOPT_POSTFIELDS, "clown=bozo" );
this doesn't...
|
by: xerc |
last post by:
I am trying to create a generic function I can call to download all files from a single remote FTP directory -- using CURL. I want to multi-thread it, but need to get the single thread functionality...
|
by: Steve |
last post by:
My site is hosted on a Godaddy reseller site. Godaddy only allows the
use of Curl to access remote sites.
What is the method for listing a directory after connecting to the
site with Curl?
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| | |