sean            Fri Feb 27 00:38:36 2004 EDT

  Modified files:              
    /phpdoc/en/reference/curl/functions curl-close.xml curl-exec.xml 
                                        curl-setopt.xml 
  Log:
  Added examples (from curl-init)
  
  
http://cvs.php.net/diff.php/phpdoc/en/reference/curl/functions/curl-close.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc/en/reference/curl/functions/curl-close.xml
diff -u phpdoc/en/reference/curl/functions/curl-close.xml:1.3 
phpdoc/en/reference/curl/functions/curl-close.xml:1.4
--- phpdoc/en/reference/curl/functions/curl-close.xml:1.3       Sat Jun 15 04:41:36 
2002
+++ phpdoc/en/reference/curl/functions/curl-close.xml   Fri Feb 27 00:38:35 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
 <!-- splitted from ./en/functions/curl.xml, last change in rev 1.1 -->
   <refentry id="function.curl-close">
    <refnamediv>
@@ -15,6 +15,29 @@
     <para>
      This function closes a CURL session and frees all resources.
      The CURL handle, <parameter>ch</parameter>, is also deleted.
+     <example>
+      <title>
+       Initializing a new CURL session and fetching a webpage
+      </title>
+      <programlisting role="php">
+<![CDATA[
+<?php
+// create a new curl resource
+$ch = curl_init();
+
+// set URL and other appropriate options
+curl_setopt($ch, CURLOPT_URL, "http://www.example.com/";);
+curl_setopt($ch, CURLOPT_HEADER, 0);
+
+// grab URL and pass it to the browser
+curl_exec($ch);
+
+// close curl resource, and free up system resources
+curl_close($ch);
+?>
+]]>
+      </programlisting>
+     </example>
     </para>
    </refsect1>
   </refentry>
http://cvs.php.net/diff.php/phpdoc/en/reference/curl/functions/curl-exec.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/curl/functions/curl-exec.xml
diff -u phpdoc/en/reference/curl/functions/curl-exec.xml:1.4 
phpdoc/en/reference/curl/functions/curl-exec.xml:1.5
--- phpdoc/en/reference/curl/functions/curl-exec.xml:1.4        Fri Aug 22 06:49:26 
2003
+++ phpdoc/en/reference/curl/functions/curl-exec.xml    Fri Feb 27 00:38:35 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <!-- splitted from ./en/functions/curl.xml, last change in rev 1.1 -->
   <refentry id="function.curl-exec">
    <refnamediv>
@@ -17,6 +17,29 @@
      session and all the options for the session are set.  Its purpose
      is simply to execute the predefined CURL session (given by the
      <parameter>ch</parameter>).
+     <example>
+      <title>
+       Initializing a new CURL session and fetching a webpage
+      </title>
+      <programlisting role="php">
+<![CDATA[
+<?php
+// create a new curl resource
+$ch = curl_init();
+
+// set URL and other appropriate options
+curl_setopt($ch, CURLOPT_URL, "http://www.example.com/";);
+curl_setopt($ch, CURLOPT_HEADER, 0);
+
+// grab URL and pass it to the browser
+curl_exec($ch);
+
+// close curl resource, and free up system resources
+curl_close($ch);
+?>
+]]>
+      </programlisting>
+     </example>
     </para>
     <note>
      <para>
http://cvs.php.net/diff.php/phpdoc/en/reference/curl/functions/curl-setopt.xml?r1=1.8&r2=1.9&ty=u
Index: phpdoc/en/reference/curl/functions/curl-setopt.xml
diff -u phpdoc/en/reference/curl/functions/curl-setopt.xml:1.8 
phpdoc/en/reference/curl/functions/curl-setopt.xml:1.9
--- phpdoc/en/reference/curl/functions/curl-setopt.xml:1.8      Sat Dec 20 23:21:42 
2003
+++ phpdoc/en/reference/curl/functions/curl-setopt.xml  Fri Feb 27 00:38:35 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
 <!-- splitted from ./en/functions/curl.xml, last change in rev 1.1 -->
   <refentry id="function.curl-setopt">
    <refnamediv>
@@ -419,6 +419,29 @@
        </simpara>
       </listitem>
      </itemizedlist>
+     <example>
+      <title>
+       Initializing a new CURL session and fetching a webpage
+      </title>
+      <programlisting role="php">
+<![CDATA[
+<?php
+// create a new curl resource
+$ch = curl_init();
+
+// set URL and other appropriate options
+curl_setopt($ch, CURLOPT_URL, "http://www.example.com/";);
+curl_setopt($ch, CURLOPT_HEADER, 0);
+
+// grab URL and pass it to the browser
+curl_exec($ch);
+
+// close curl resource, and free up system resources
+curl_close($ch);
+?>
+]]>
+      </programlisting>
+     </example>
     </para>
    </refsect1>
   </refentry>

Reply via email to