curl_errno

int curl_errno(int curld) 

Queries a cURL session for the last error code encountered.

Returns:

Integer value of the last error code encountered by the cURL session

Description:

Queries the cURL session indicated by the curld parameter for the last error code encountered. A set of constants are defined by the cURL extension to make utilizing these values easier:

Constant Description
CURLE_OK The last operation executed successfully.
CURLE_COULDNT_CONNECT The cURL session found the requested host, but failed to connect to it.
CURLE_COULDNT_RESOLVE_PROXY The given proxy server’s hostname could not be resolved.
CURLE_COULDNT_RESOLVE_HOST User attempted to access a resource on a host whose name could not be resolved.
CURLE_FAILED_INIT ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.