PHP Classes

Yahoo! Login

Recommend this page to a friend!

      PHP HTTP protocol client  >  All threads  >  Yahoo! Login  >  (Un) Subscribe thread alerts  
Subject:Yahoo! Login
Summary:How to get through Yahoo's Security
Messages:84
Author:Erick Bajao
Date:2005-10-12 03:50:41
Update:2007-11-17 20:53:27
 
  1 - 10   11 - 20   21 - 30   31 - 40   41 - 50   51 - 60   ...   80 - 84  

  31. Re: Yahoo! Login   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2005-12-12 19:49:12 - In reply to message 28 from Erick Bajao
Sorry, you are right, I did not notice the GET request that you make first.

Anyway, I found a couple of bugs that were affecting the login success. One was about not encoding cookie values properly and another is about dealing with cookie domains that oddly start with dot.

I just uploaded a fixed version that I confirmed that it accesses Friendster properly.

  32. Re: Yahoo! Login   Reply   Report abuse  
Picture of Erick Bajao Erick Bajao - 2005-12-13 02:02:10 - In reply to message 31 from Manuel Lemos
Hi, I downloaded the updated http.php but still no luck.. Ends up with the same error..

Here's the script:

<?php
require('http.php');
$http = new http_class();
set_time_limit(0);
$http->timeout=0;
$http->data_timeout=0;
$http->debug=1;
$http->html_debug=1;
$http->user_agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
$http->follow_redirect=1;
$http->redirection_limit=5;

$url = 'http://www.friendster.com/index.php';
$http->GetRequestArguments($url,$arguments);
$arguments["RequestMethod"]="GET";
$arguments["Headers"]["Pragma"]="nocache";
flush();
$error=$http->Open($arguments);
if($error == ''){
$error=$http->SendRequest($arguments);
if($error == ''){
$headers=array();
$error=$http->ReadReplyHeaders($headers);
if($error == ''){
for(;;)
{
$error=$http->ReadReplyBody($body,1000);
if($error!="" || strlen($body)==0)
break;
$result .= $body;
}
$currentContent = $result;
$result = '';

$http->Close();

$url = 'http://www.friendster.com/index.php';
$http->GetRequestArguments($url,$arguments);
$arguments["RequestMethod"]="POST";
//$arguments["Headers"]["Pragma"]="nocache";
$arguments["PostValues"]=array(
"_submitted"=>"1",
"next"=>"/home.php?statpos=index",
"tzoffset"=>"",
"email"=>'[email protected]',
"password"=>'123abc'
);
flush();
$error=$http->Open($arguments);
if($error == ''){
$error=$http->SendRequest($arguments);
if($error == ''){
$headers=array();
$error=$http->ReadReplyHeaders($headers);
if($error == ''){
for(;;)
{
$error=$http->ReadReplyBody($body,1000);
if($error!="" || strlen($body)==0)
break;
$result .= $body;
}
$currentContent = $result;
$result = '';

$http->Close();

//echo 'BODY::'.$currentContent;
}
}
}
}
}
}
if(strlen($error)){
echo "<CENTER><H2>Error: ",$error,"</H2><CENTER>\n";
}
?>

I don't know what's causing this problem.. Can you compare it with the code you used to login friendster?

Thank you very much..

  33. Re: Yahoo! Login   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2005-12-13 03:19:38 - In reply to message 32 from Erick Bajao
Your example works fine as expected. The only detail is that you are redirected first to an interstitial page to invite some friends as if this was the first time you got to the site.

Friendster sets a cookie to skip this page next time you login. So, you can emulate the setting this cookie with the SetCookie function like this:

$http->SetCookie("friendster_inviteinterstitial", "1", "", "/", "www.friendster.com", 0);


  34. Re: Yahoo! Login   Reply   Report abuse  
Picture of Collin Schaafsma Collin Schaafsma - 2005-12-13 03:43:08 - In reply to message 33 from Manuel Lemos
Hi Erick. I would be really interested in your class to login to gmail, hotmail and yahoo especially! I'm really have a hard time with yahoo. My goal is too login to a private yahoo groups. If you have time I would also appreciate the code using the http class sent to me. collin at collination.com

Thank you for your time!
Collin

  35. Re: Yahoo! Login   Reply   Report abuse  
Picture of Erick Bajao Erick Bajao - 2005-12-13 03:53:53 - In reply to message 33 from Manuel Lemos
ok.. I tried that one now, placed it on all possible places in the code but still the same error...

Error: it was not possible to send data to the HTTP server

why can't I send a post request? Does the PHP version has something to do with this? or does the server that is hosting my script may be interrupting it? I'm currently using PHP 4.2.3..

Thanks for helping me on this one...:)

  36. Re: Yahoo! Login   Reply   Report abuse  
Picture of Erick Bajao Erick Bajao - 2005-12-13 04:02:32 - In reply to message 35 from Erick Bajao
Hi Collin, I sent it to your mail... Inform me if it helps and I'll try to submit it here in phpclasses.org coz now I'm really tied up with my work...:)

I hope I can make this Friendster thing to work... will really make me feel ALOT better...:)

  37. Re: Yahoo! Login   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2005-12-13 05:03:30 - In reply to message 35 from Erick Bajao
The script that you sent works adding the SetCookie line but not with the email and password that you supplied. I replaced by an account email and password of mine and it works as expected.

  38. Re: Yahoo! Login   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2005-12-13 05:20:58 - In reply to message 37 from Manuel Lemos
Actually it works with that account but it says it is not yet verified. In any case it does not give me any error. I am using PHP 4.3.11. So, there may be a problem with your version.

  39. Re: Yahoo! Login   Reply   Report abuse  
Picture of Erick Bajao Erick Bajao - 2005-12-13 06:09:32 - In reply to message 38 from Manuel Lemos
Oh yes sorry i forgot to verify it.. anyway it's working now but only on the other server which is PHP 4.3.4

How come it fails in 4.2.3? Is there a fix for this? Because I think I'm required to use this version.. Thanks!

  40. Re: Yahoo! Login   Reply   Report abuse  
Picture of Matias Prasodjo Matias Prasodjo - 2005-12-13 14:14:38 - In reply to message 38 from Manuel Lemos
FYI, your script at zip and tarball file is empty

 
  1 - 10   11 - 20   21 - 30   31 - 40   41 - 50   51 - 60   ...   80 - 84