(PHP 5, PHP 7)
curl_copy_handle — 锟斤拷锟斤拷一锟斤拷cURL锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟窖★拷锟�
$ch
) : resource锟斤拷锟斤拷一锟斤拷cURL锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟酵拷锟窖★拷睢�
锟斤拷锟斤拷一锟斤拷锟铰碉拷cURL锟斤拷锟斤拷锟�
Example #1 锟斤拷锟斤拷一锟斤拷cURL锟斤拷锟�
<?php
// 锟斤拷锟斤拷一锟斤拷锟铰碉拷cURL锟斤拷源
$ch = curl_init();
// 锟斤拷锟斤拷URL锟斤拷锟斤拷应锟斤拷选锟斤拷
curl_setopt($ch, CURLOPT_URL, 'http://www.example.com/');
curl_setopt($ch, CURLOPT_HEADER, 0);
// 锟斤拷锟狡撅拷锟�
$ch2 = curl_copy_handle($ch);
// 抓取URL (http://www.example.com/) 锟斤拷锟斤拷锟斤拷锟斤拷锟捷革拷锟斤拷锟斤拷锟�
curl_exec($ch2);
// 锟截憋拷cURL锟斤拷源锟斤拷锟斤拷锟斤拷锟酵凤拷系统锟斤拷源
curl_close($ch2);
curl_close($ch);
?>