使用cURL php获取outlook消息

I want connect to Outlook.com using cURL (php) and get the message from inbox.

<?php
        $url = "https://login.live.com/login.srf?wa=wsignin1.0&ct=1369129355&rver=6.1.6206.0&sa=1&ntprob=-1&wp=MBI_SSL_SHARED&wreply=https:%2F%2Fmail.live.com%2F%3Fowa%3D1%26owasuffix%3Dowa%252f&id=64855&snsc=1&cbcxt=mail"; 
        $post_fields ="email=xxxx@outlook.com&pass=xxxx"; 

        $cookie_path = "\hotmail_login\cook";
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url); 
        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; 
    ?>

Any suggestions? Thanks in advance

To connect with mail sever you should use POP3 or IMAP, there is no point in using curl for this.

http://php.net/manual/en/function.imap-open.php

here you have examples of how to connect with IMAP using PHP and get messages