Login to yahoo using cUrl in php
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 ($ch, CURLOPT_POSTFIELDS, “login=emailid&passwd=password&&submit=Sign In”); Please enter your EMAIL ID and PASSWORD, For examplecurl_setopt ($ch, CURLOPT_POSTFIELDS, “login=admin23123@yahoo.com&passwd=mypass&&submit=Sign In”);
- <?php
- $url =“http://login.yahoo.com/config/login?
- .src=ym&.intl=us&.partner=&.done=http%3A%2F%2Fmail.yahoo.com%2F”;
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
- curl_setopt ($ch, CURLOPT_COOKIEJAR, ‘/temp/cookie.txt’);
- curl_setopt ($ch, CURLOPT_POSTFIELDS, “login=emailid&passwd=password&&submit=Sign In”);
- ob_start();
- curl_exec ($ch);
- ob_end_clean();
- curl_close ($ch);
- unset($ch);
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_COOKIEFILE, “/temp/cookie.txt”);
- curl_setopt($ch, CURLOPT_URL,“http://us.f515.mail.yahoo.com/ym/login?”);
- $result = curl_exec ($ch);
- curl_close ($ch);
- echo $result;?>

- 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]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
Related posts:
- Store Data In Remote DataBase Using cUrl or Execute a HTTP POST Using PHP CURL
- Post Data To Another Website Using cURL In PHP
- Simple PHP Login Script
- Thirteen Simple Rules To Speed Up Your Website
- Simple shell script to FTP file from your Desktop to FTP server
- How To Set And Get Cookies Using PHP
- Enabling curl on XAMPP for Windows








Thanks for tutorial, 1 exemple is more than 1000 words