How to copy a cURL handle with all of its preferences in PHP

1 Answer

0 votes
$curl = curl_init();

curl_setopt($curl, CURLOPT_URL, "http://cprogramming.bootzlabs.com/");
curl_setopt($curl, CURLOPT_HEADER, 0);

// copy the handle
$curl2 = curl_copy_handle($curl);

// pass the URL to the browser
curl_exec($curl2);

curl_close($curl);
curl_close($curl2);


/*
run: 

Check your browser 

*/

 



answered Jun 7, 2016 by avibootz

Related questions

1 answer 134 views
134 views asked Jun 10, 2021 by avibootz
1 answer 204 views
1 answer 287 views
2 answers 1,042 views
1 answer 258 views
1 answer 172 views
...