Use PHP crawl Baidu post mailbox data, PHP crawl post-mail
Note: This program may be very suitable for those who do Baidu post-marketing friends.
To visit Baidu Bar when, often see the landlord to share some resources, request to leave the mailbox, the landlord just give hair.
For a popular post, the number of mailboxes left is very much, the landlord needs a copy of those replies to the mailbox, and then paste to send mail, not tortured to death is to be exhausted. Bored to write a crawl Baidu post-mail data procedures, need to take away.
Program implementation of a key crawl post all mailbox and paging crawl mailbox two functions, the interface is too lazy to do, the effect is as follows:
The same as the usual, directly paste source
Php$url 2="";$page="";if($_get[' Url2 ']== ' ""){ $url 2= "Http://tieba.baidu.com/p/2314539885?pn=1";}Else{ $url 2=$_get[' Url2 '];}if($_get[' Page ']== ' "){ $page= "1";}Else{ $page=$_get[' Page '];}?>
Post Link: |
Phpif($_get[' Type ']!= ""){ $counts=0; if($_get[' type ']== ' GetAll '){ $pages=$_get[' Page ']; $url=$_get[' URL ']; for($i= 0;$i<$pages;$i++){ $ch 2=curl_init (); curl_setopt ($ch 2, Curlopt_url,$url); curl_setopt ($ch 2, Curlopt_followlocation,TRUE); curl_setopt ($ch 2, Curlopt_ssl_verifyhost,FALSE); curl_setopt ($ch 2, Curlopt_ssl_verifypeer,false); curl_setopt ($ch 2, Curlopt_returntransfer,TRUE); $texts= Curl_exec ($ch 2); Curl_close ($ch 2); $dat=getemail ($texts); for($j= 0;$j<Count($dat);$j++){ Echo $dat[$j]." "; $counts++; } } }Else if($_get[' type ']== ' Getnow '){ $url=$_get[' Url2 ']; $ch 2=curl_init (); curl_setopt ($ch 2, Curlopt_url,$url); curl_setopt ($ch 2, Curlopt_followlocation,TRUE); curl_setopt ($ch 2, Curlopt_ssl_verifyhost,FALSE); curl_setopt ($ch 2, Curlopt_ssl_verifypeer,false); curl_setopt ($ch 2, Curlopt_returntransfer,TRUE); $texts= Curl_exec ($ch 2); Curl_close ($ch 2); $dat=getemail ($texts); for($i= 0;$i<Count($dat);$i++){ Echo $dat[$i]." "; $counts++; } } Echo'Total data collected: '. $counts. ' Reviews ';}functionGetemail ($str){ $pattern= "/([a-z0-9\-_\.] +@[a-z0-9]+\. [A-z0-9\-_\.] +)/"; Preg_match_all($pattern,$str,$EMAILARR); return $EMAILARR[0]; }?>http://www.bkjia.com/PHPjc/1119221.html www.bkjia.com true http://www.bkjia.com/PHPjc/1119221.html techarticle use PHP crawl Baidu post mailbox data, PHP crawl post-mail note: This program may be very suitable for those who do Baidu paste marketing friends. Visit Baidu Post bar, often will see the building ... |