Home > PHP > Function > cURL > curl_error()

curl_error()

curl_error - Return a string containing the last error for the current session

Syntax

string curl_error (resource $ch)

Arguments

  • ch - A cURL handle returned by curl_init().

Description

Returns a clear text error message for the last cURL operation.

Version

PHP 4.0.3, 5

Return value

Returns the error message or ''(the empty string) if no error occurred.