curl asynchrone pool
function curl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); curl_close($ch); return $output; } $urls = array( 'http://www.example.com', 'http://www.example.co.uk', 'http://www.example.com.br', 'http://www.example.ru', 'http://www.example.es', ); $pool = new Pool(10); foreach ($urls as $url) { $pool->submit(new CurlTask($url)); } $pool->shutdown();