(PHP 5 >= 5.5.0, PHP 7)
Reset all options of a libcurl session handle
void curl_reset ( resource $ch )
This function re-initializes all options set on the given cURL handle to the default values.
Parameters:
ch
A cURL handle returned by curl_init().
Returns:
No value is returned.
Notes:
curl_reset() also resets the URL given as the curl_init() parameter.
Examples:
curl_reset() example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <?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 HTTP request curl_exec( $ch ); // the previously set user-agent will be not sent, it has been reset by curl_reset // Close the handle curl_close( $ch ); ?> |
See also:
Please login to continue.