SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Php Aol Login

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Php Aol Login

    hi guys, i am trying to login to aol webmail but it's taking me again to login page, i am sending all necessory headers , here is my code, please help me. it has become challenge for me
    PHP Code:
    <?php
            
    //dl('php_curl.dll');
            
    $curl curl_init();
            
    $url_login_box "https://my.screenname.aol.com/_cqr/login/login.psp?mcState=initialized&seamless=novl&sitedomain=sns.webmail.aol.com&lang=en&locale=us&authLev=2&siteState=ver%3a1%252c0%26ld%3awebmail.aol.com
    "
    ;
            
    curl_setopt($curlCURLOPT_URL$url_login_box);
            
    curl_setopt($curlCURLOPT_RETURNTRANSFER1);
            
    //curl_setopt($curl, CURLOPT_PROXY, '202.165.250.76:8080');
            
    curl_setopt($curlCURLOPT_VERBOSE0);
            
    curl_setopt($curlCURLOPT_COOKIEJAR'ck.txt');
            
    curl_setopt($curlCURLOPT_HEADER,1);
            
    //curl_setopt($curl, CURLOPT_HTTPHEADER, $arr);
            
    curl_setopt($curlCURLOPT_SSL_VERIFYPEERFALSE);

            
    $data1 curl_exec($curl);
            
    //curl_close();
            
    preg_match_all("|Set-Cookie:(.+?);|"$data1$result);
            
    $ckies trim($result[1][0]).'; '.trim($result[1][1]);
        
    //$ckies = trim(implode("; ", $result[1]));
        
    $post_fields "sitedomain=sns.webmail.aol.com&siteId=&lang=en&locale=us&authLev=2&siteState=ver%253A1%25252c0%2526ld%253Awebmail.aol.com&isSiteStateEncoded=true&mcState=initialized&usrd=4468306&loginId=ashhadms&password=4907gray&rememberMe=off";
        echo 
    $ckies.'<br>';
        
        
    $arr[] = "POST /_cqr/login/login.psp HTTP/1.1";
        
    $arr[] = "Host: my.screenname.aol.com";
        
    $arr[] = "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1";
        
    $arr[] = "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
        
    $arr[] = "Accept-Language: en-us,en;q=0.5";
        
    $arr[] = "Keep-Alive: 300";
        
    $arr[] = "Connection: keep-alive";
        
    $arr[] = "Referer: https://my.screenname.aol.com/_cqr/login/login.psp?mcState=initialized&seamless=novl&sitedomain=sns.webmail.aol.com&lang=en&locale=us&authLev=2&siteState=ver%3a1%252c0%26ld%3awebmail.aol.com";
        
    $arr[] = "Cookie: " $ckies ;
        
    $arr[] = "Content-Type: application/x-www-form-urlencoded";    
        
    $arr[] = "Content-Length: " strlen($post_fields);
        
    $arr[] = $post_fields;
        
    print_r($arr);
            
        echo 
    "<pre>".$data1."</pre>";
            echo 
    "completed Transaction 1<br>";
            
    $url_login_post "https://my.screenname.aol.com/_cqr/login/login.psp";
            
    curl_setopt($curlCURLOPT_URL$url_login_post);
            
    curl_setopt($curlCURLOPT_HTTPHEADER$arr);

        
    $data2 curl_exec ($curl);
        echo 
    $data2;

    ?>

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anybody out here?? plz help


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •