curl_multi_strerror

(PHP 5 >= 5.5.0, PHP 7, PHP 8)

curl_multi_strerrorReturn string describing error code

Description

curl_multi_strerror(int $error_code): ?string

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/");
$ch2 curl_init("http://php.net/");

// 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);
    if (
$active) {
        
curl_multi_select($mh);
    }
} while (
$active && $status === CURLM_OK);

// Check for errors
if ($status != CURLM_OK) {
    
// Display error message
    
echo "ERROR!\n " curl_multi_strerror($status);
}

?>

See Also

Here you can write a comment


Please enter at least 10 characters.
Loading... Please wait.
* Pflichtangabe
There are no comments available yet.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Category: Software & Web-Development

PHP cURL Tutorial: Using cURL to Make HTTP Requests

cURL is a powerful PHP extension that allows you to communicate with different servers using various protocols, including HTTP, HTTPS, FTP, and more. ...

TheMax

Autor : TheMax
Category: PHP-Tutorials

Midjourney Tutorial - Instructions for beginners

There is an informative video about Midjourney, the tool for creating digital images using artificial intelligence, entitled "Midjourney tutorial in German - instructions for beginners" ...

Mike94

Autor : Mike94
Category: KI Tutorials

Publish a tutorial

Share your knowledge with other developers worldwide

Share your knowledge with other developers worldwide

You are a professional in your field and want to share your knowledge, then sign up now and share it with our PHP community

learn more

Publish a tutorial