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

curl-and-php

Re: I am trying to login to Hotmail

From: Kristian Grimsby <ascii00_at_online.no>
Date: Fri, 26 May 2006 10:57:45 +0200
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@hotmail.com)."&passwd=123456";)
2. Have you checked the headers for additional fields that need to be posted?
(PPSX=Pa&PwdPad=IfYouAreReadingThisYouHaveTooMuchFr&login=me@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@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
Received on 2006-05-26