<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <refentry xml:id="function.curl-reset" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>curl_reset</refname> <refpurpose>Reset all options of a libcurl session handle</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>void</type><methodname>curl_reset</methodname> <methodparam><type>resource</type><parameter>ch</parameter></methodparam> </methodsynopsis> <para> This function re-initializes all options set on the given cURL handle to the default values. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <variablelist> &curl.ch.description; </variablelist> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> &return.void; </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title><function>curl_reset</function> example</title> <programlisting role="php"> <![CDATA[ <?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_setopt($ch, CURLOPT_URL, 'http://example.com/'); 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); ?> ]]> </programlisting> </example> </para> </refsect1> <refsect1 role="notes"> &reftitle.notes; <note> <para> <function>curl_reset</function> also resets the URL given as the <function>curl_init</function> parameter. </para> </note> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><function>curl_setopt</function></member> </simplelist> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"~/.phpdoc/manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->