一般采集网站数据的流程为:通过CURL模拟浏览器请求URL,得到字符串后进行正则匹配(preg_match_all、preg_match)、字符串处理(str_replace、substr等)等操作后得到想要的数据。
以下是获取大众点评的店名和电话号码实例,废话不多说,直接贴代码...
admin
2年前 (2016-12-01) 5300℃
1喜欢
进入安装原php的源码目录,
cd ext
cd curl
在CURL目录下执行
/usr/local/php/bin/phpize
如果找不到Cannot find config.m4.
则到下载的包找到download/php-5.6.22/ext/curl/confi...
admin
2年前 (2016-10-29) 319℃
0喜欢