Sandro Antonucci
Sandro Antonucci

Reputation: 1753

php cURL timeout and fail

how do I know if a connection made with cURL has timed out (using the relative option) OR failed in general? I can only output the response body/headers, right?

Upvotes: 0

Views: 333

Answers (1)

David Z.
David Z.

Reputation: 5701

You can call curl_error or curl_errno after curl_exec.

http://www.php.net/manual/en/function.curl-error.php

Upvotes: 3

Related Questions