Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有什么方法可以让爬虫从发送假 404 标头的页面中读取 html。我尝试使用页面获取页面implode,curl但file_get_contents仍然出现标题 404 错误。类似的 SO 参考链接
implode
curl
file_get_contents
您可能想要使用 curl(或 Guzzle)并实际添加用户代理以及请求。如果没有提供(或阻止)用户代理,某些站点会返回 404(或其他错误)