PHP可以写网页爬虫吗 ?原理是什么?

WBOY
Release: 2016-06-06 20:46:33
Original
1362 people have browsed it

PHP可以写网页爬虫吗 ?原理是什么?

回复内容:

PHP可以写网页爬虫吗 ?原理是什么?

>

几乎任何语言都能写爬虫,原理也都一样,http 协议抓网页内容,按照需求程度不同,可能还要抓响应码、Cookies、header然后自行处理。

PHP 有 CURL 库,除稳定性稍差以外,基本可用。

可以 通常是用curl做 不过抓取网页的速度相对java等语言来说有点慢

可以写,至于原理都是基于HTTP协议,解析得到的文本,解析出其中的连接,然后再继续访问这些连接,如此反复

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!