mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
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:
parent
288705b80e
commit
fd8932b966
1 changed files with 49 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue