PHP Crawling Methods
Any one can tell me if curl is not able to crawl in PHP then which metho开发者_如何学运维d will be used for crawling?
If you are referring to creating a spider to crawl entire remote sites the way utilities like wget can, I don't believe cURL has that capability. cURL would be used to make the requests and download each page, but you have to create the logic in your PHP script to parse the content of the pages, extract the links, and create a list of URLs to crawl. cURL doesn't do that part for you.
CURL can:
- Follow redirect (set up as option)
- Store content (->curl_exec())
This is all your need to crawl. Used common methods, take examples from http://ua2.php.net/manual/en/function.curl-exec.php
精彩评论