cURL timeouts from some sites, works perfectly on others [closed] cURL timeouts from some sites, works perfectly on others [closed] curl curl

cURL timeouts from some sites, works perfectly on others [closed]


You get a timeout because the remote HTTP server doesn't send back a response within your requested timeout period. It really is that simple. It actually doesn't even send a single byte within those 5 seconds, as is told by the error message.

You being able to ping it is completely irrelevant since ping is an ICMP message that is very different from a HTTP response from the site's web server.

Now, the question you would then of course ask is why doesn't the server respond to your request, and that's not easy to tell without knowing more. It could be as simple as that the server ignores you due to you having misbehaved previously, it could just be slow or it can be one of several other reasons...