Documentation for curl_reset

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330507 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Adam Scheller 2013-06-15 13:03:44 +00:00
parent 288705b80e
commit fd8932b966

View file

@ -14,11 +14,9 @@
<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>
&warn.undocumented.func;
</refsect1>
<refsect1 role="parameters">
@ -35,6 +33,54 @@
</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