Page 1 of 1

Help me about Programatic click in login

Posted: Sat Apr 14, 2007 11:24 am
by Ankan
Everah | Edited to correct AOL Speak, which is against forum rules.

hey dude,
I [s]m[/s] am facing a problem. I need to login any particular site programatically...how it can [s]b[/s] be done?
any idea? [s]plz[/s] please help me out....
Also each login returns a cookie... does it possible to utilize to extract further info?
Regards
Ankan
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.

Posted: Sun Apr 15, 2007 9:54 am
by feyd
Read up on cURL, fsockopen() or other similar solutions thereof.

Posted: Tue Apr 17, 2007 9:56 am
by Ankan
Everah | Edited to correct more AOL Speak.

Hi,
[s]thanx[/s] thanks a lot. But its not pretty much clear there. can [s]u[/s] you [s]plz[/s] pleasehelp sending a dummy code that will make me login my gmail account automatically, i will just give it my email add and password. I [s]m[/s] amin a hurry....[s]plz[/s] pleasehelp.
Regards
Ankan.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.

Posted: Tue Apr 17, 2007 8:58 pm
by feyd
So long as you continue to disregard our warning regarding AOL Speak, no, I will not help.

Posted: Tue Apr 17, 2007 9:13 pm
by John Cartwright
Have you read the user comments? I.e. http://www.php.net/manual/en/ref.curl.php#57005

Posted: Thu Apr 19, 2007 2:22 am
by Ankan
hi,
Sorry I did not understand the warning. From now on nothing like that will happen. So now i can ask for ur help, right? Please help me about : making programmatic login to a site, it can be any login page (mainly in php), for example ur hotmail account, I will send username,password and the login page URL, a function will make the login for me, and send me the sent cookie so that i get extra information. is it clear? Please feel free to ask me if you have any question. I am looking forward to have a dummy code from you.
Regards
Ankan.

Posted: Thu Apr 19, 2007 2:33 am
by aaronhall
No one here is paid enough to write your code for you. Jcart already pointed you to a script that covers what you're looking for.

"ur" is spelled "your".

Posted: Thu Apr 19, 2007 4:41 am
by Ankan
Sorry, If YOU mind..... I am actually accustomed to it...hopefully this post will be alright.
Yah, YOU are right , sorry to ask about making code... but I was in a hurry and that reference was not clear to me...that's why I asked. No offence please.

Regards
ANKAN

Regarding cURL installation with PHP triad

Posted: Sat Apr 28, 2007 12:41 pm
by Ankan
hi,
I want to use cURL with PHP triad. I have downloaded the package of cURL but did not understand how to configure it. Probably it requires some variable to set on or register. Can anyone send me any simple solution ?
Best Regards
Ankan

Posted: Sat Apr 28, 2007 12:55 pm
by John Cartwright
What have you tried? Were not here to do the work for you. We've already given you a starting point, so post what you have done so far and we will see where you went wrong to hopefully correct you.

Posted: Sat Apr 28, 2007 1:18 pm
by Ankan
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


this is the code i tried for: 
I have only PHP triad installed on my computer. When I execute this code it shows a message saying:
Fatal error: Call to undefined function: curl_init() in c:\apache\htdocs\test4.php on line 3

Code: Select all

<?

$ch = curl_init();


curl_setopt($ch, CURLOPT_URL, 'http://www.webmasterworld.com/login.cgi');


curl_setopt ($ch, CURLOPT_POST, 1);


curl_setopt ($ch, CURLOPT_POSTFIELDS, 'username=user&password=xyz');


curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');

curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);


$store = curl_exec ($ch);


curl_setopt($ch, CURLOPT_URL, 'http://www.webmasterworld.com/supporters');


$content = curl_exec ($ch);

echo $content;

curl_close ($ch); 

?>


What should I do? install the cURL package and then configure it? or there is simpler way?

Regards
Ankan


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Sun Apr 29, 2007 2:30 pm
by John Cartwright
Likely all you need to do is uncomment

Code: Select all

#extension=php_curl.dll
by removing the # symbol in your php.ini, and then restart Apache.

Posted: Thu May 03, 2007 1:50 am
by Ankan
hi,
Thanx a lot for the solution and now it works.
Sorry for the previous posting since it did not follow the rule.
I feel another problem regarding to the previous script I sent.
It shows an warning that : "Multiple executions on the same handle are not currently supported, please upgrade to the next version of PHP " .
It because of the second curl_exe() statement as below:

Code: Select all

"$content = curl_exec ($ch);"

Regards
Ankan