curl_close


php128 apg

CLOSE the cURL session.

This function has no effect.

Prior to PHP 8.0.0, this function was used to close the resource.


<?php

void curl_close
(CurlHandle $handle);

$handle A cURL handle returned by curl_init()

?>

 $handle 


The cURL handle returned by curl_init function.


  1 EXERCISE   

<?php

$url 
"https://www.example.com/";
// create a new cURL resource
$ch curl_init();

// set URL and other appropriate options

// grab URL and pass it to the browser

// close cURL resource, and free up system resources
curl_close($ch);

?>

 RESULT   

SEE the next exercises - other lessons!