一張保單輕鬆享有人生各階段風險保障 通通幫您規畫好 | 您還敢使用滿是變種細菌的電話通話嗎 請定期電話清潔消毒, |
[php] 自動登入yahoo |
房東:乖乖 發表時間:2012-10-18 |
<?php $url ="http://login.yahoo.com/config/login?.src=ym&.intl=us&.partner=&.done=http%3A%2F%2Fmail.yahoo.com%2F"; curl_close ($ch); |
|
廣利不動產-板橋在地生根最實在--新板特區指名度最高、值得您信賴的好房仲 完整房訊,房屋、店面熱門精選物件,廣利不動產 優質仲介,房屋租賃、買賣資訊透明,交易真安心! 廣利不動產-新板特區指名度最高、值得您信賴的好房仲 您的托付,廣利用心為您服務 |
1 樓住戶:jack 發表時間:2012-10-18 |
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, “[email protected]&passwd=mypass&&submit=Sign In”); 1. 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;?> 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]]]]]]]]]]]]]]]]]]]]]]]]]]]]] http://mistonline.in/wp/login-to-yahoo-using-curl-in-php/ |
2 樓住戶:jeff 發表時間:2012-10-18 |
// script name: login_to_facebook.php // coder: Sony AK Knowledge Center - www.sony-ak.com // your facebook credentials $username = "----"; $password = "-----"; // access to facebook home page (to get the cookies) $curl = curl_init (); curl_setopt ( $curl, CURLOPT_URL, "http://www.facebook.com" ); curl_setopt ( $curl, CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt ( $curl, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt ( $curl, CURLOPT_ENCODING, "" ); curl_setopt ( $curl, CURLOPT_COOKIEJAR, getcwd () . '/cookies_facebook.cookie' ); curl_setopt ( $curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)" ); $curlData = curl_exec ( $curl ); curl_close ( $curl ); // do get some parameters for login to facebook $charsetTest = substr ( $curlData, strpos ( $curlData, "name=\"charset_test\"" ) ); $charsetTest = substr ( $charsetTest, strpos ( $charsetTest, "value=" ) + 7 ); $charsetTest = substr ( $charsetTest, 0, strpos ( $charsetTest, "\"" ) ); $locale = substr ( $curlData, strpos ( $curlData, "name=\"locale\"" ) ); $locale = substr ( $locale, strpos ( $locale, "value=" ) + 7 ); $locale = substr ( $locale, 0, strpos ( $locale, "\"" ) ); $lsd = substr ( $curlData, strpos ( $curlData, "name=\"locale\"" ) ); $lsd = substr ( $lsd, strpos ( $lsd, "value=" ) + 7 ); $lsd = substr ( $lsd, 0, strpos ( $lsd, "\"" ) ); // do login to facebook $curl = curl_init (); curl_setopt ( $curl, CURLOPT_URL, "https://login.facebook.com/login.php?login_attempt=1" ); curl_setopt ( $curl, CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt ( $curl, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt ( $curl, CURLOPT_POST, 1 ); curl_setopt ( $curl, CURLOPT_SSL_VERIFYPEER, false ); curl_setopt ( $curl, CURLOPT_POSTFIELDS, "charset_test=" . $charsetTest . "&locale=" . $locale . "&non_com_login=&email=" . $username . "&pass=" . $password . "&charset_test=" . $charsetTest . "&lsd=" . $lsd ); curl_setopt ( $curl, CURLOPT_ENCODING, "" ); curl_setopt ( $curl, CURLOPT_COOKIEFILE, getcwd () . '/cookies_facebook.cookie' ); curl_setopt ( $curl, CURLOPT_COOKIEJAR, getcwd () . '/cookies_facebook.cookie' ); curl_setopt ( $curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)" ); //$curlData is the html of your facebook page $curlData = curl_exec ( $curl ); ?> |
姓名: | |||
佈告內容: | |||
其他選項: | |||
|