|
|
#Hood Docs
|
|
|
## CURL Concurrent
|
|
|
```php
|
|
|
use Hood\Concurrent;
|
|
|
$CurlMulti = Concurrent::curlMulti();
|
|
|
$CurlMulti->call('http://www.baidu.com',function ($curl_info, $curl_data, $callback_data) {
|
|
|
print_r($curl_info);
|
|
|
}, 1)->call('http://www.sogou.com',function ($curl_info, $curl_data, $callback_data) {
|
|
|
print_r($curl_info);
|
|
|
}, 2)->finish();
|
|
|
|
|
|
|
|
|
$CurlMulti = Concurrent::curlMulti();
|
|
|
$CurlMulti->callRest('http://www.qin.com/index/demo', 'get', function ($curl_info, $curl_data, $callback_data) {
|
|
|
print_r($curl_data);
|
|
|
}, array('a' => 1))->finish();
|
|
|
``` |
|
|
\ No newline at end of file |
...
|
...
|
|