cvs: phpdoc /en/reference/curl/functions curl-copy-handle.xml

From: Date: Wed, 15 Jun 2005 22:15:56 +0000
Subject: cvs: phpdoc /en/reference/curl/functions curl-copy-handle.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969368634@lists.php.net to get a copy of this message
sean Wed Jun 15 18:15:56 2005 EDT Modified files: /phpdoc/en/reference/curl/functions curl-copy-handle.xml Log: Document curl_copy_handle() #Patch from Tom Westcott http://cvs.php.net/diff.php/phpdoc/en/reference/curl/functions/curl-copy-handle.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/curl/functions/curl-copy-handle.xml diff -u phpdoc/en/reference/curl/functions/curl-copy-handle.xml:1.1 phpdoc/en/reference/curl/functions/curl-copy-handle.xml:1.2 --- phpdoc/en/reference/curl/functions/curl-copy-handle.xml:1.1 Sun May 2 11:46:36 2004 +++ phpdoc/en/reference/curl/functions/curl-copy-handle.xml Wed Jun 15 18:15:55 2005 @@ -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>

« previous php.doc (#969368634) next »