PHP implements the method of capturing the thunder VIP account, and php captures the vip account

Source: Internet
Author: User

PHP implements the method of capturing the thunder VIP account, and php captures the vip account

This example describes how to capture the thunder VIP account in PHP. Share it with you for your reference. The details are as follows:

I read the account captured by @ Jinn_Wei Python, so I wrote a PHP version.
PS1: the code is not optimized and only basic functions are implemented.
PS2: Snoopy is used in the code.
PS3: Test address: http://xunlei.kphcdr.com

<? Php/*** capture the love password thunder VIP account * @ author kphcdr@163.com */header ("Content-type: text/html; charset = UTF-8"); include 'snoopy. php '; $ url = 'HTTP: // response = new Snoopy (); $ result = $ snoopy-> fetchlinks ($ url)-> getResults (); foreach ($ result as $ key => $ val) {if (FALSE = strpos ($ val, 'thread -')) {unset ($ result [$ key]);} else {if (! Strpos ($ val, '-1-1.html ') {unset ($ result [$ key]) ;}}$ real = new Snoopy (); $ result = array_values (array_unique ($ result); $ text = $ real-> fetchtext ($ result [1])-> getResults (); $ text = iconv ('gbk', 'utf-8 // IGNORE ', $ text ); // match the required content $ pattern = '/^ thunder member account | thunder sharing account + [a-zA-Z0-9 _] {} +: + [0-9] + password sharing + [a-zA-Z0-9 _] {4, 20} \ s/'; preg_match_all ($ pattern, $ text, $ return ); foreach ($ return [0] as $ a) {echo $ a; echo '<br/> ';}

Snoopy-1.2.3.tar.gz click here download site.

I hope this article will help you with php programming.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.