cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: I am trying to login to Hotmail

From: Chng Hui Wooi <hui_wooi_at_yahoo.com>
Date: Fri, 26 May 2006 08:31:59 -0700 (PDT)

Thank Kristian.

I try to modify my code as below
   
  <?
$url = "https://login.live.com/ppsecure/post.srf?";
$login = "abc1234_at_hotmail.com";
$passwd = "123456789012";
$post_fields = "PPSX=Pa&PwdPad=IfYouAreReadingThisYouHaveToo&login=".urlencode($login)."&passwd=".urlencode($passwd)."&LoginOptions=2&PPFT=B5vz2qQPjMAP4MJP00HQBBIqHrTvGEZwIS9qdiq%21o0ghdSLOtEwp%21mI1oVT**ALt7IGJgMSN8qdDNiG6dL0nf7fiD8sj";
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)";
$cookie_path = "\hotmail_login\cook";
  $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_path);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_path);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = curl_exec ($ch);
echo $output;
?>
   
  but I still facing the same error. Do you have any idea about it?
   
  Best Regards,
  Hui Wooi

Kristian Grimsby <ascii00_at_online.no> wrote:
  Just a couple of advises

1. Have you tried to escape the email adress? Could be som unwanted chars like @ or something
($post_fields = "login=".urlencode(abcd_at_hotmail.com)."&passwd=123456";)
2. Have you checked the headers for additional fields that need to be posted?
(PPSX=Pa&PwdPad=IfYouAreReadingThisYouHaveTooMuchFr&login=me_at_hotmail.com&passwd=xxx&LoginOptions=2&PPFT=B5vz2qQPjMAP4MJP00HQBBIqHrTvGEZwIS9qdiq%21o0ghdSLOtEwp%21mI1oVT**ALt7IGJgMSN8qdDNiG6dL0nf7fiD8sj)
This is what i got in my post field when logging in to hotmail...

Give it som thoughts..

-Kristian

Chng Hui Wooi wrote: My script as below

  <?
$url = "https://login.live.com/ppsecure/post.srf?";
$post_fields = "login=abcd_at_hotmail.com&passwd=123456";
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)";
$cookie_path = "\hotmail_login\cook";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_path);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_path);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = curl_exec ($ch);
echo $output;
  ?>

  and I keep getting this error in login page
  The e-mail address or password is incorrect. Please retype the e-mail address and password, or sign up if you haven't already done so. Need help signing in?

Do you have any idea on it?
   
  Best regards
  Hui Wooi
  
  
---------------------------------
  Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get Yahoo! Messenger with Voice

---------------------------------
  _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

                
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-05-26