We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example Code:
$urls = array('http://google.com', 'https://twitter.com'); $mc = JMathai\PhpMultiCurl\MultiCurl::getInstance(); $calls = array(); foreach($urls as $url) { $handle = curl_init($url); curl_setopt( $handle, CURLOPT_NOBODY, true ); curl_setopt( $handle, CURLOPT_HEADER, false ); $calls[] = $mc->addCurl($handle); } $r = array(); foreach($calls as $email => $call) { $r[] = $call->code; } var_dump($r);
Hi,
the result of first url will always return null, why? did I missing anything or is it a bug?
Thanks.
The text was updated successfully, but these errors were encountered:
Your code works if you add this option
curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);
So I guess it is a bug somewhere.
Sorry, something went wrong.
Thanks @bramley. Looks like addUrl() sets it but addCurl() does not. I will update this unless I get a PR for it first. 👍
addUrl()
addCurl()
No branches or pull requests
Example Code:
Hi,
the result of first url will always return null, why? did I missing anything or is it a bug?
Thanks.
The text was updated successfully, but these errors were encountered: