Use PHP to capture the mailbox data of Baidu Post Bar, and use php to capture the mailbox of the post bar. Use PHP to capture the mailbox data of Baidu Post Bar, and use php to capture the mailbox of the post bar. note: This program may be very suitable for those who do Baidu Post bar marketing. When you go to Baidu Post Bar, you will often see that the building uses PHP to capture Baidu Post bar mailbox data, and php crawls the post bar mailbox
Note: This program may be very suitable for those who do Baidu Post bar marketing.
When you go to Baidu Post Bar, you will often see the owner share some resources, asking you to leave an email box before sending it to the owner.
For a hot Post, the number of mailboxes left is very large. the landlord needs to copy the reply mailboxes one by one and then paste and send the emails, either suffering or exhausting. It is boring to write a program that captures the mailbox data of Baidu Post Bar and needs to be taken away.
The program implements two functions: one-click capture of all posts mailbox and paging capture of mailbox, the interface is too lazy to do, the effect is as follows:
Old rules: directly paste the source code
Post link: |
Phpif ($ _ GET ['type']! = "") {$ Counts = 0; if ($ _ GET ['type'] = "getAll") {$ pages = $ _ GET ['Page']; $ url = $ _ GET ['URL']; for ($ I = 0; $ I <$ pages; $ I ++) {$ ch2 = curl_init (); curl_setopt ($ ch2, CURLOPT_URL, $ url); curl_setopt ($ ch2, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt ($ ch2, success, FALSE); curl_setopt ($ ch2, success, FALSE, false); curl_setopt ($ ch2, CURLOPT_RETURNTRANSFER, TRUE); $ texts = curl_exec ($ ch2); curl_close ($ ch2); $ dat = getEmail ($ texts ); for ($ j = 0; $ j "; $ Counts ++ ;}}} else if ($ _ GET ['type'] =" getNow ") {$ url =$ _ GET ['url2 ']; $ ch2 = curl_init (); curl_setopt ($ ch2, CURLOPT_URL, $ url); curl_setopt ($ ch2, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt ($ ch2, success, FALSE ); curl_setopt ($ ch2, CURLOPT_SSL_VERIFYPEER, false); curl_setopt ($ ch2, CURLOPT_RETURNTRANSFER, TRUE); $ texts = curl_exec ($ ch2); curl_close ($ ch2 ); $ dat = getEmail ($ texts); for ($ I = 0; $ I "; $ Counts ++ ;}} echo 'collected data :'. $ counts. 'string';} function getEmail ($ str) {$ pattern = "/([a-z0-9 \-_ \.] + @ [a-z0-9] + \. [a-z0-9 \-_ \.] +)/"; preg_match_all ($ pattern, $ str, $ emailArr); return $ emailArr [0] ;}?> Note: This program may be very suitable for those who do Baidu Post bar marketing. When you go to the Baidu Post Bar, you will often see the building... |