使用multi-curl从数组php保存多个图像

使用multi-curl从数组php保存多个图像,php,arrays,multithreading,image,curl,Php,Arrays,Multithreading,Image,Curl,我知道通过单个curl请求我们可以保存图像,但如果我们有包含数百个URL的URL的php数组,那么就可以使用multicurl请求同时保存图像。因为多次卷曲会大大缩短时间 $ch = curl_init('http://example.com/image.php'); $fp = fopen('/my/folder/flower.gif', 'wb'); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0

我知道通过单个curl请求我们可以保存图像,但如果我们有包含数百个URL的URL的php数组,那么就可以使用multicurl请求同时保存图像。因为多次卷曲会大大缩短时间

$ch = curl_init('http://example.com/image.php');
$fp = fopen('/my/folder/flower.gif', 'wb');
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);
这是单卷曲请求的代码。如何修改数组的多重旋度

$url={'http://http://example.com/image1.gif',
'http://http://example.com/image2.gif',
'http://http://example.com/image3.gif',
'http://http://example.com/image4.gif',
'http://http://example.com/image5.gif',
'http://http://example.com/image6.gif',
'http://http://example.com/image7.gif'};

看起来像文档中的示例,演示了如何执行此操作。我找不到该示例。。。你能写下下面的回答吗?