Closed haqqi closed 11 years ago
Current cURL wrapper only support single request. I think it would be good if FuelPHP has a feature of Multi-thread cURL.
The use case:
$curl = Request::forge('curl'); for($i = 0; $i < 10; $i++) { $curl->add_request('http://a-domain.com/', 'callback', array('request-number' => $i)); } $temp_var = array(); function some_callback($response, $param) { $temp_var[$param['request-number']] = $response->response(); //maybe we can use response wrapper }
Several libraries i have tried, but i was not satisfied:
I suggest using Guzzle for this, it's feature-full and supports this out of the box: http://guzzlephp.org/http-client/client.html#sending-requests-in-parallel
Current cURL wrapper only support single request. I think it would be good if FuelPHP has a feature of Multi-thread cURL.
The use case:
Several libraries i have tried, but i was not satisfied: