(PHP 5 >= 5.5.0, PHP 7)
Return string describing error code
string curl_multi_strerror ( int $errornum )
Returns a text error message describing the given CURLM error code.
Parameters:
errornum
One of the » CURLM error codes constants.
Returns:
Returns error string for valid error code, NULL
otherwise.
Examples:
curl_multi_strerror() example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <?php // Create cURL handles // Create a cURL multi handle $mh = curl_multi_init(); // Add the handles to the multi handle curl_multi_add_handle( $mh , $ch1 ); curl_multi_add_handle( $mh , $ch2 ); // Execute the multi handle do { $status = curl_multi_exec( $mh , $active ); // Check for errors if ( $status > 0) { // Display error message echo "ERROR!\n " . curl_multi_strerror( $status ); } } while ( $status === CURLM_CALL_MULTI_PERFORM || $active ); ?> |
See also:
Please login to continue.