(PHP 5)
curl_copy_handle — Copy a cURL handle and all its options
resource curl_copy_handle ( resource $ch )
Copy a cURL handle and keep the same options.
ch
The cURL handle returned by curl_init().
Returns a new cURL handle.
Copy a cURL handle
<?php// Create a new cURL resource $ch = curl_init(); // Set the URL and corresponding options curl_setopt($ch, CURLOPT_URL, 'http://www.example.com/'); curl_setopt($ ch, CURLOPT_HEADER, 0);// Copy handle $ch2 = curl_copy_handle($ch);// Grab the URL (http://www.example.com/) and pass it to the browser curl_exec($ch2);// Close the cURL resource and release the system resources curl_close($ch2); curl_close($ch); ?>