php curl在几个请求后无法连接 [英] php curl can't connect after several request

查看:149
本文介绍了php curl在几个请求后无法连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的php卷曲有问题。我请求一个url像几千次,但几百或几千请求。我无法再次连接到他们的服务器,因为我无法完成我的请求的循环。任何一个遇到同样的问题吗?这是错误我有:无法连接到服务器

I have a problem with my php curl. I am requesting to a url for like thousands times but after few hundred or thousands request. I am not able to connect to their server again because of that I can't complete the loop of my requests. does any one encounter the same problem? here is the error I have: Couldn't connect to server

推荐答案

这是很可能是他们的防火墙阻止你,您发送的请求过多,则称为速率限制。您将不得不与他们联系,或者找到一种减少您发送的请求的方式。

It is most likely their firewall blocking you due to the fact that you're sending too many requests, this is called rate limiting. You will either have to contact them regarding this or find a way of reducing the requests you send.

您真的没有办法知道服务器速率限制请求,但我建议在请求之间等待一两秒,尽量不要一次发送太多请求。

You don't really have any way of knowing how the server rate limits requests, but I would suggest waiting a second or two between requests and try not to send too many requests at once.

这篇关于php curl在几个请求后无法连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆