mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Document curl_copy_handle()
#Patch from Tom Westcott git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@188490 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
d6d088f857
commit
beff461a87
1 changed files with 30 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id="function.curl-copy-handle">
|
||||
<refnamediv>
|
||||
<refname>curl_copy_handle</refname>
|
||||
|
@ -13,9 +13,37 @@
|
|||
<type>resource</type><methodname>curl_copy_handle</methodname>
|
||||
<methodparam><type>resource</type><parameter>ch</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function copy's a cURL handle.
|
||||
Returning a new cURL handle with the same preferences.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Copying a cURL handle.</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// create a new curl resource
|
||||
$ch = curl_init();
|
||||
|
||||
&warn.undocumented.func;
|
||||
// set URL and other appropriate options
|
||||
curl_setopt($ch, CURLOPT_URL, 'http://www.example.com/');
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
|
||||
// copy the handle
|
||||
$ch2 = curl_copy_handle($ch);
|
||||
|
||||
// grab URL (http://www.example.com/) and pass it to the browser
|
||||
curl_exec($ch2);
|
||||
|
||||
// close curl resources, and free up system resources
|
||||
curl_close($ch2);
|
||||
curl_close($ch);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue