“.$result.”"; $LOGINURL = “http://mail.google.com/mail”; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$LOGINURL); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path); $result = curl_exec ($ch); //echo ““; // parse http://mail.google.com/mail/?ui=2&ik=b7e8a936c2&view=cbj //ID_KEY = ‘b7e8a936c2′, $arr_post = ”; preg_match_all(“/ID_KEY = ‘(.*?)\’/”, $result, $arr_post); $url_login = $arr_post[1][0]; $id_key = $arr_post[1][0]; $url = ‘http://mail.google.com/mail/?ui=2&ik=’.$url_login.’&view=cbj’; //print “\r\n
loading:”.$url; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_REFERER, $reffer); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path); $result = curl_exec ($ch); curl_close ($ch); //echo ““; $url = ‘http://mail.google.com/mail/?ui=2&ik=’.$id_key.’&view=tl&start=0&num=70&init=1&rt=h&search=inbox’; //print “\r\n
loading:”.$url; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_REFERER, $reffer); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path); $result = curl_exec ($ch); curl_close ($ch); //echo ““; $arr_post = ”; echo $result; preg_match_all(“/email(.*?)\”(.*?)\\\/”, $result, $arr_post); print ‘
'; print_r($arr_post[2]); print '
‘; } // extra code 2 if else { login_form(); } //////////////////////////////////////////////////////////////////////////////////////////////// function login_form() { ?> g Mail Get gmail Email Address Contact List