时间:2021-07-01 10:21:17 帮助过:8人阅读
一般通过curl、file_get_contents来采集,如:
$ch=curl_init($post_url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Firefox/24.0");
$con=curl_exec($ch);
一般通过curl、file_get_contents来采集,如:
$ch=curl_init($post_url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Firefox/24.0");
$con=curl_exec($ch);
node+1,比如这货http://phantomjs.org/
js由于有跨域问题,是不能做采集任务的,不过你可以考虑下node.js