PHP code to log on to Yahoo?

Status
Not open for further replies.

Scrabbler

New member
Jul 20, 2006
144
2
0
Can someone point me in the right direction or post a PHP code snippet for how to automagically log on to a site like Yahoo? I'm trying to look at the packets using httpliveheaders and it's looking pretty damn complicated.

Thanks for any help.
S.
 


welcome to the wonderful world of cookies

edit: not trying to be a dick, I am trying to figure out the same shit right now. Look into the curl documentation on php.net.
 
What exactly are you trying to do? What do you mean by "log on a site"?

Let's say I want to do something with Yahoo Answers, and to do it, I need to be logged in. I want have a script that will log on to Yahoo, and do some things with Yahoo Answers. I think I can handle the later part, but I'm stuck on figuring out how to log in/get authenticated.

Will look at the curl docs, thanks lucab.
 
Ok, I'm able to login with my script and get to the page I needed to get to.
Here are the curl options that I needed to set.

curl_setopt($ch,CURLOPT_POSTFIELDS,$postdata);
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_COOKIEFILE,"cookie.txt");
curl_setopt($ch,CURLOPT_COOKIEJAR,"cookie.txt");
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1 );
curl_setopt($ch,CURLOPT_MAXREDIRS,100);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1 );

Get the $postdata that you need by using httpliveheaders plugin for Firefox.

S.
 
Go into lerchmo's split tester and steal his bot.php script which does all the arbi from a PHP class
 
I have it working fine with PHP. Unfortunately I seem to have been locked out of posting on Yahoo with error 999. They must have some bandwidth throttling or something. Gotta add some delays to my script.
 
I have it working fine with PHP. Unfortunately I seem to have been locked out of posting on Yahoo with error 999. They must have some bandwidth throttling or something. Gotta add some delays to my script.

Use proxies and multiple accounts

Also, make sure you are setting the referrer and useragent header fields correctly so that it isn't obvious you are a bot.
 
Good tips, thanks. Already using multiple accounts, but havent had to use a proxy once I throttled things way back.

Is there a non-secure login URL for Yahoo? That would make finding proxies to use easier.

S.
 
Status
Not open for further replies.