Characteristics of PHP Snoopy

Source: Internet
Author: User

Everyone knows thatWhat is PHP Snoopy?

Snoopy is a php class used to imitate the functions of a web browser. It can obtain webpage content and send forms.

Some features of PHP Snoopy:

* Convenient webpage content capture
* Convenient crawling of webpage text (HTML tag removal)
* Convenient webpage crawling
* Proxy host supported
* Basic user name/password verification is supported.
* User_agent, referer, cookies, and header content can be set)
* Supports browser redirection and controls steering depth
* Extends links in a webpage to high-quality URLs (default)
* Easy to submit data and obtain returned values
* Supports tracking HTML frameworks (added in v0.92)
* Supports transmitting cookies during redirection (added in v0.92)

PHP Snoopy requires that your server's PHP version be 4 or above and support PCRE (Perl Compatible Regular Expressions). All basic LAMP services are supported.

It provides the following interfaces or methods:

Fetch ($ URI)
This method captures the content of a webpage. $ URI captures the webpage URL and stores the captured results to $ this-> results. If you capture a frame, each frame will be crawled and the results will be saved to an array.

Fetchtext ($ URI)
This method is roughly the same as fetch (), except for HTML tags and other irrelevant information.

Fetchform ($ URI)
This method only returns the form element on the captured webpage.

Fetchlinks ($ URI)
This method only returns the link on the crawled webpage. By default, the returned Link contains the link of the domain name.

Submit ($ URI, $ formvars)
This method submits a form to the specified $ URI. $ Formvars is an array of form variables to be passed.

Submittext ($ URI, $ formvars)
This method is basically the same as submit (), but it returns text, excluding html tags and other irrelevant data.

Submitlinks ($ URI)
This method returns a link.

These are all the content of PHP Snoopy and I hope to help you.


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.