Here is a similar question already. I am trying to simulate a browser like behaviour of my script to login into hotmail using http requests and cookies. I found this link which shows how to login to facebook using http requests in c#.
I am using PHP Pear HTTP_Request2 package to simulate this. I was able to render the login page but I cannot login.
I googled about how to login into Hotmail.com and found someone saying that hotmail is CSRF protected and i cannot achieve this. But i think there might be a solution because i am using a server side script to make the request so there is no chance of csrf. If anyone has done this before, i would highly appreciate some help.