Login to yahoo using cUrl in php

This Tutorial Has Been Viewed 10,959 Times.

Very easy to authenticate and login to yahoo using the cUrl library in php, very easy to do.Just check this link if you are not aware of what cUrl is all about In this line curl_setopt ($chCURLOPT_POSTFIELDS“login=emailid&passwd=password&&submit=Sign In”); Please enter your EMAIL ID and PASSWORD, For examplecurl_setopt ($chCURLOPT_POSTFIELDS“login=admin23123@yahoo.com&passwd=mypass&&submit=Sign In”); 

  1.  <?php
  2. $url =“http://login.yahoo.com/config/login?
  3. .src=ym&.intl=us&.partner=&.done=http%3A%2F%2Fmail.yahoo.com%2F”;
  4. $ch = curl_init();     
  5. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
  6. curl_setopt($ch, CURLOPT_URL, $url);
  7. curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
  8. curl_setopt ($ch, CURLOPT_COOKIEJAR, ‘/temp/cookie.txt’);
  9. curl_setopt ($ch, CURLOPT_POSTFIELDS, “login=emailid&passwd=password&&submit=Sign In”);
  10. ob_start();     
  11. curl_exec ($ch);
  12. ob_end_clean(); 
  13. curl_close ($ch);
  14. unset($ch);
  15. $ch = curl_init();
  16. curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  17. curl_setopt($ch, CURLOPT_COOKIEFILE, “/temp/cookie.txt”);
  18. curl_setopt($ch, CURLOPT_URL,“http://us.f515.mail.yahoo.com/ym/login?”);
  19. $result = curl_exec ($ch);
  20. curl_close ($ch);
  21. echo $result;?>PLEASE MAKE A NOTE
  22. NOW THIS CODE IS NOT WORKING.WE ARE TRYING OUR BEST FOR AN ALTERNATE CODE, FOR THE TIME BEING YOU CAN USE THIS CODE FOR LEARNING PURPOSE.SORRY FOR THE INCONVINIENCE.[[[[[[[[[[[[[[[[[[[[[[[[[UPDATED CODE COMING SOON]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
VN:F [1.9.13_1145]
Rating: 8.5/10 (2 votes cast)
VN:F [1.9.13_1145]
Rating: -4 (from 4 votes)

Login to yahoo using cUrl in php, 8.5 out of 10 based on 2 ratings

Incoming search terms:





You will also be interested in ,

Tags: ,

4 Responses

  1. Tutorial Men says:

    Thanks for tutorial, 1 exemple is more than 1000 words

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)
  2. Sudhi says:

    Hi, I’ve however managed to login to yahoo using curl in php. Please check out the code in :
    http://leaveurdream.blogspot.com/2010/05/yahoo-login-using-curl.html

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)
  3. this is not working now :(

    any update?

    anyway nice site :D

    VA:F [1.9.13_1145]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.13_1145]
    Rating: +1 (from 1 vote)

Leave a Reply

Spam protection by WP Captcha-Free

Proudly designed by Mistonline.in.
Affordable Seo PackagesSeo BlogEdu Backlinks
More in cUrl, PHP, Tools (99 of 136 articles)