Help me about Programatic click in login

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ankan
Forum Newbie
Posts: 8
Joined: Sat Apr 14, 2007 11:13 am

Help me about Programatic click in login

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Read up on cURL, fsockopen() or other similar solutions thereof.
Ankan
Forum Newbie
Posts: 8
Joined: Sat Apr 14, 2007 11:13 am

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

So long as you continue to disregard our warning regarding AOL Speak, no, I will not help.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Have you read the user comments? I.e. http://www.php.net/manual/en/ref.curl.php#57005
Ankan
Forum Newbie
Posts: 8
Joined: Sat Apr 14, 2007 11:13 am

Post 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.
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post 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".
Ankan
Forum Newbie
Posts: 8
Joined: Sat Apr 14, 2007 11:13 am

Post 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
Ankan
Forum Newbie
Posts: 8
Joined: Sat Apr 14, 2007 11:13 am

Regarding cURL installation with PHP triad

Post 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
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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.
Ankan
Forum Newbie
Posts: 8
Joined: Sat Apr 14, 2007 11:13 am

Post 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]
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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.
Ankan
Forum Newbie
Posts: 8
Joined: Sat Apr 14, 2007 11:13 am

Post 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
Post Reply