通过simple_html_dom,我想拉取70000个页面的数据,每个页面url格式一样,所以我用for进行遍历,浏览器在进行过程中总是出现问题,比如
file_get_contents(http://o.uhin.org/i1.aspx): failed to open stream: HTTP request failed!
请问如何解决这类问题
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
用curl获取网页数据,看看curl_error是什么。
另外这个应该算是一个小型爬虫了,建议你直接在cli运行
看看php爬虫,或者使用
phpquery