kenken
kenken

Reputation: 61

php curl can't connect after several request

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

Upvotes: 0

Views: 229

Answers (1)

Matt
Matt

Reputation: 2869

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.

Upvotes: 4

Related Questions