Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for timeout? #26

Open
agerber23 opened this issue Jan 17, 2016 · 0 comments
Open

Check for timeout? #26

agerber23 opened this issue Jan 17, 2016 · 0 comments

Comments

@agerber23
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant