Example #1
0
 static function get($user, $password)
 {
     $mail = new GetMail();
     $url = 'https://login.sina.com.cn/sso/login.php';
     $post = array("username" => $user, "password" => $password, 'entry' => 'freemail', 'gateway' => 0, 'encoding' => 'UTF-8', 'url' => 'http://mail.sina.com.cn/', 'returntype' => 'META');
     $opts = array(CURLOPT_FOLLOWLOCATION => true);
     $body = $mail->post($url, $post, $opts);
     preg_match("/replace\\(\"(.*?)\"\\)\\;/", $body, $out);
     $url = $out[1];
     $body = $mail->post($url, $post, $opts);
     //$body = iconv('gb2312','utf-8',$body);
     $url = "http://mail.sina.com.cn/cgi-bin/login.php";
     $body = $mail->post($url, $post, $opts);
     preg_match_all("/sid=(.*)/i", $body, $out);
     $sid = $out[1][0];
     $sid = substr($sid, 0, 32);
     //通讯录地址
     $url = "http://g1a8.mail.yeah.net/jy3/address/addrlist.jsp?sid=" . $sid . "&gid=all";
     $body = $mail->post($url, array());
     $body = iconv('gb2312', 'utf-8', $body);
     $html = str_get_html($body);
     $table = $html->find('table[class=Ibx_gTable Ibx_gTable_Con] tr');
     foreach ($table as $tr) {
         $name = $tr->find('td[class=Ibx_Td_addrName]', 0)->plaintext;
         $email = $tr->find('td[class=Ibx_Td_addrEmail]', 0)->plaintext;
         $output[$name] = $email;
     }
     return $output;
 }
Example #2
0
 static function get($user, $password)
 {
     $mail = new GetMail();
     $url = 'http://reg.163.com/logins.jsp';
     $post = array("username" => $user, "password" => $password, 'verifycookie' => 1, 'style' => -1, 'product' => 'mail163', 'selType' => -1, 'secure' => 'on');
     $body = $mail->post($url, $post);
     $url = "https://ssl.mail.163.com/entry/coremail/fcg/ntesdoor2?df=webmail163&from=web&funcid=loginone&iframe=1&language=-1&net=t&passtype=1&product=mail163&race=178_37_247_gz&style=-1&uid=" . $user . "@163.com";
     $body = $mail->post($url, $post);
     preg_match_all("/sid=(.*)/i", $body, $out);
     $sid = $out[1][0];
     $sid = substr($sid, 0, 32);
     //通讯录地址
     $url = "http://g4a30.mail.163.com/jy3/address/addrlist.jsp?sid=" . $sid . "&gid=all";
     $body = $mail->post($url, array());
     $body = iconv('gb2312', 'utf-8', $body);
     $html = str_get_html($body);
     $table = $html->find('table[class=Ibx_gTable Ibx_gTable_Con] tr');
     foreach ($table as $tr) {
         $name = $tr->find('td[class=Ibx_Td_addrName]', 0)->plaintext;
         $email = $tr->find('td[class=Ibx_Td_addrEmail]', 0)->plaintext;
         $output[$name] = $email;
     }
     return $output;
 }
Example #3
0
 static function get($user, $password)
 {
     $mail = new GetMail();
     $url = 'https://reg.163.com/logins.jsp?type=1&product=mailyeah&url=http://entry.mail.yeah.net/cgi/ntesdoor?lightweight%3D1%26verifycookie%3D1%26style%3D-1';
     $post = array("username" => $user, "password" => $password);
     $body = $mail->post($url, $post);
     $url = "https://ssl.mail.yeah.net/entry/cgi/ntesdoor?funcid=loginone&language=-1&passtype=1&iframe=1&product=mailyeah&from=web&df=emailyeah&race=149_46_37_bj&module=&uid={$usert}&style=-1&net=t&skinid=null";
     $body = $mail->post($url, $post);
     preg_match_all("/sid=(.*)/i", $body, $out);
     $sid = $out[1][0];
     $sid = substr($sid, 0, 32);
     //通讯录地址
     $url = "http://g1a8.mail.yeah.net/jy3/address/addrlist.jsp?sid=" . $sid . "&gid=all";
     $body = $mail->post($url, array());
     $body = iconv('gb2312', 'utf-8', $body);
     $html = str_get_html($body);
     $table = $html->find('table[class=Ibx_gTable Ibx_gTable_Con] tr');
     foreach ($table as $tr) {
         $name = $tr->find('td[class=Ibx_Td_addrName]', 0)->plaintext;
         $email = $tr->find('td[class=Ibx_Td_addrEmail]', 0)->plaintext;
         $output[$name] = $email;
     }
     return $output;
 }
Example #4
0
 static function get($user, $password)
 {
     $mail = new GetMail();
     $url = 'http://w39.mail.qq.com/cgi-bin/login';
     $post = array('f' => 'xhtmlmp', 'tfcont' => '', 'uin' => $user, 'aliastype' => '@qq.com', 'pwd' => $password, 'mss' => '1');
     $body = $mail->post($url, $post);
     preg_match("/url=(http:\\/\\/.*?)\"/", $body, $out);
     $url = $out[1];
     //解决URL
     $arr = GetMail::params($url);
     $sid = $arr['sid'];
     $host = $arr['localhost'];
     $url = $host . "/cgi-bin/addr_listall?sid=" . $sid . "&flag=star&s=search&folderid=all&pagesize=10&from=today&fun=slock&page=0&topmails=0&t=addr_listall&loc=today,,,158'";
     $body = $mail->get($url);
     $html = str_get_html($body);
     foreach ($html->find("a") as $v) {
         $o = $v->innertext;
         if (false === strpos($o, '返回')) {
             echo $o;
             exit;
         }
     }
 }