(PHP 5 >= 5.5.0)
curl_multi_setopt — Returns a string text describing the error code.
illustrate
string curl_multi_strerror ( int $errornum )
Returns a string literal describing the CURLM error code.
parameter
errornum
CURLM One of the constants in error codes.
return value
Returns a string text describing the error code, otherwise NULL is returned.
Example
Example
<?php // Create cURL handle $ch1 = curl_init ( " https://www.codercto.com/ " ) ; $ch2 = curl_init ( " http://php.net/ " ) ; // Create a batch cURL handle $mh = curl_multi_init ( ) ; // Add handle to batch handle curl_multi_add_handle ( $mh , $ch1 ) ; curl_multi_add_handle ( $mh , $ch2 ) ; // Execute batch 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 ) ; ?>