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.