file_get_contents捕获403禁止错误
我有一个PHP文件,该文件通过代理服务器发出file_get_contents请求。有时,由于代理,我会得到403禁止错误响应,并且要用不同的代理重试相同的请求,它只是跳过下一个请求,因此丢失了数据。
我知道,有了卷曲,有一种方法可以捕获错误,如果禁止其403,请与另一个代理人重试,但是如果可以使用file_get_contents,我找不到任何地方。
非常感谢您花时间阅读我的问题,我真的很感谢您的帮助, 真挚地,
I have a php file that makes a file_get_contents request through proxy servers. Sometimes, I get a 403 forbidden error response because of the proxy, and in stead of retrying the same request with a different proxy, it just skips to the next request so the data is lost.
I know that with curl there is a way to catch the error and if its a 403 forbidden, retry with another proxy but I can't find anywhere if this is possible with file_get_contents.
Thanks a lot for taking your time to read my problem and I would really appreciate your help,
Sincerely,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论