一般通过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);
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
node+1,比如这货http://phantomjs.org/
js由于有跨域问题,是不能做采集任务的,不过你可以考虑下node.js