Php/docs/function.curl-multi-strerror

From Get docs

curl_multi_strerror

(PHP 5 >= 5.5.0, PHP 7)

curl_multi_strerrorReturn string describing error code


Description

curl_multi_strerror ( int $error_code ) : string|null

Returns a text error message describing the given CURLM error code.


Parameters

error_code
One of the » CURLM error codes constants.


Return Values

Returns error string for valid error code, NULL otherwise.


Examples

Example #1 curl_multi_strerror() example

<?php// Create cURL handles$ch1 = curl_init("http://example.com%22/);$ch2 = curl_init("http://php.net/%22);// Create a cURL multi handle$mh = curl_multi_init();// Add the handles to the multi handlecurl_multi_add_handle($mh, $ch1);curl_multi_add_handle($mh, $ch2);// Execute the multi handledo {    $status = curl_multi_exec($mh, $active);    if ($active) {        curl_multi_select($mh);    }} while ($active && $status === CURLM_OK);// Check for errorsif ($status != CURLM_OK) {    // Display error message    echo "ERROR!\n " . curl_multi_strerror($status);}?>

See Also