Skip to content

Check for timeout? #26

@agerber23

Description

@agerber23

Hey, I have some custom curl parameters:

$ch = curl_init("http://google.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT_MS , 1); //timeout in seconds
$google = $mc->addCurl($ch);

$e_code = curl_multi_info_read($google);
var_dump($e_code);

Do you guys know of any way to check that the network call timed out?

I tried using the function curl_multi_info_read, but it returns "expects parameter 1 to be resource, object given"

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions