PHP多线程类及用法实例(2)

$curl_mul=new curl_multi(); 
$curl_mul->setUrlList(array('https://www.jb51.net/img/logo.jpg','https://www.jb51.net/img/logo.jpg','https://www.jb51.net/img/logo.jpg')); 
$a=$curl_mul->execute(); 
$i=1; 
foreach($a as $v){ 
        $filename=$i.'.gif'; 
        $fp2=@fopen($filename,'a'); 
        fwrite($fp2,$v); 
        fclose($fp2); 
        $i++; 
}

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/5f0304cae877960a338b89cd5152039d.html