Easy Tutorial
❮ Func Date Timezone Set Php Ref Math ❯

PHP curl_reset Function

PHP cURL Reference Manual

(PHP 5 >= 5.5.0)

curl_reset — Resets all options of the libcurl session handle.


Description

void curl_reset ( resource $ch )

This function reinitializes all cURL options to their default values.

Note: curl_reset() also resets the URL parameter of curl_init().


Parameters

ch

A cURL handle returned by curl_init().


Return Values

No return value.


Examples

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

// Set the CURLOPT_USERAGENT option
curl_setopt($ch, CURLOPT_USERAGENT, "My test user-agent");

// Reset all previously set options
curl_reset($ch);

// Send an HTTP request
curl_setopt($ch, CURLOPT_URL, 'http://w3cschool.cc/');
curl_exec($ch); // the previously set user-agent will not be sent, it has been reset by curl_reset

// Close the handle
curl_close($ch);
?>

PHP cURL Reference Manual

❮ Func Date Timezone Set Php Ref Math ❯