Easy Tutorial
❮ Func Math Base Convert Func Math Getrandmax ❯

PHP curl_close Function

PHP cURL Reference Manual

(PHP 4 >= 4.0.2, PHP 5)

curl_close — Close a cURL session


Description

void curl_close ( resource $ch )

Closes a cURL session and frees all resources. The cURL handle, ch, is also freed.


Parameters

ch

The cURL handle returned by curl_init().


Return Value

No return value.


Example

Initialize a cURL session to fetch a webpage

<?php
// Create a new cURL resource
$ch = curl_init();

// Set the URL and corresponding options
curl_setopt($ch, CURLOPT_URL, "http://www.w3cschool.cc/");
curl_setopt($ch, CURLOPT_HEADER, 0);

// Fetch the URL and pass it to the browser
curl_exec($ch);

// Close the cURL resource and free system resources
curl_close($ch);
?>

See Also


PHP cURL Reference Manual

❮ Func Math Base Convert Func Math Getrandmax ❯