SnoopyPHP network client provides local download _ PHP Tutorial

Source: Internet
Author: User
SnoopyPHP network client provides local download. Snoopy is used in magpierss, which makes me a little interested in studying this. On SF, find the source code. It is actually a class, but don't laugh at it. But snoopy is used in magpierss, which makes me a little interested in studying this. On SF, find the source code. It is actually a class, but don't smile. it is very powerful.

I translated the official introduction (Khan... Recently, I have always acted as a translator)
Snoopy is a php class used to imitate the functions of a web browser. it can obtain webpage content and send forms.
The following are some of its features:
1. convenient webpage content capture
2. facilitate text capture on webpages (remove HTML code)
3. convenient webpage crawling
4. support for proxy hosts
5. supports basic user/password authentication modes
6. support for custom user agent, referer, cookies, and header content
7. support browser redirection and control steering depth
8. extend the link in the webpage to a high-quality url (default)
9. easy to submit data and get the return value
10. support for tracking HTML frameworks (added in v0.92)
11. support transmitting cookies during redirection



The following is a simple example. for example, we can capture the text of my blog.

Include "Snoopy. class. php ";
$ Snoopy = new Snoopy;
$ Snoopy-> fetchtext ("http://www.phpobject.net/blog ");
Echo $ snoopy-> results;
?>

^ _ ^. It is nice to capture a link, for example.

Include "Snoopy. class. php ";
$ Snoopy = new Snoopy;
$ Snoopy-> fetchlinks ("http://www.phpobject.net/blog ");
Print_r ($ snoopy-> results );
?>

Hey, it works well, and it's all the URLs we need, but it's not like/blog/read. php/85.htm.

In addition, the submitted data will be tested later...
Yuanma/php/Snoopy-1.2.3.tar.gz local Download

Bytes. On SF, find the source code. It is actually a class, but don't laugh at it. the function is very powerful...

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.