English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
(PHP 5 >= 5.5.0)
curl_reset— Resets all options of the libcurl session handle.
void curl_reset ( resource $ch )
This function will reinitialize all option values of CURL (default values).
Note:curl_reset() will also reset the URL parameters of curl_init().
ch
The CURL handle returned by curl_init().
No return value.
<?php // Create a CURL handle $ch = curl_init(); // Set 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://oldtoolbag.com/'); curl_exec($ch); //The previously set user agent will not be sent, as it has been reset by curl_reset // Close the handle curl_close($ch); ?>