cvs: phpdoc-es /reference/curl reference.xml

From: Date: Fri, 09 May 2003 22:35:55 +0000
Subject: cvs: phpdoc-es /reference/curl reference.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-180@lists.php.net to get a copy of this message
chubu Fri May 9 18:35:55 2003 EDT Modified files: /phpdoc-es/reference/curl reference.xml Log: Traducción inicial del archivo. Index: phpdoc-es/reference/curl/reference.xml diff -u phpdoc-es/reference/curl/reference.xml:1.2 phpdoc-es/reference/curl/reference.xml:1.3 --- phpdoc-es/reference/curl/reference.xml:1.2 Mon Apr 15 20:29:57 2002 +++ phpdoc-es/reference/curl/reference.xml Fri May 9 18:35:55 2003 @@ -1,70 +1,81 @@ <?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.8 Maintainer: chubu Status: ready --> <reference id="ref.curl"> - <title>CURL, Client URL Library Functions</title> + <title>Funciones CURL (Client URL Library)</title> <titleabbrev>CURL</titleabbrev> - <partintro id="curl.partintro"> - <para> - PHP supports libcurl, a library, created by Daniel Stenberg, that - allows you to connect and communicate to many different types of - servers with many different types of protocols. libcurl currently - supports the http, https, ftp, gopher, telnet, dict, file, and - ldap protocols. libcurl also supports HTTPS certificates, HTTP - POST, HTTP PUT, FTP uploading (this can also be done with PHP's - ftp extension), HTTP form based upload, proxies, cookies and - user+password authentication. - </para> - <para> - In order to use the CURL functions you need to install the <ulink - url="&url.curl;">CURL</ulink> package. PHP requires that you use - CURL 7.0.2-beta or higher. PHP will not work with any version of - CURL below version 7.0.2-beta. - </para> - <para> - To use PHP's CURL support you must also compile PHP <option - role="configure">--with-curl[=DIR]</option> where DIR is the - location of the directory containing the lib and include - directories. In the "include" directory there should be a folder - named "curl" which should contain the easy.h and curl.h files. - There should be a file named "libcurl.a" located in the "lib" - directory. - </para> - <para> - These functions have been added in PHP 4.0.2. - </para> - <para> - Once you've compiled PHP with CURL support, you can begin using - the curl functions. The basic idea behind the CURL functions is - that you initialize a CURL session using the - <function>curl_init</function>, then you can set all your - options for the transfer via the <function>curl_exec</function> - and then you finish off your session using the - <function>curl_close</function>. Here is an example that uses - the CURL functions to fetch the PHP homepage into a file: - <example> - <title>Using PHP's CURL module to fetch the PHP homepage</title> - <programlisting role="php"> -&lt;?php + <partintro> + <section id="curl.intro"> + &reftitle.intro; + <para> + PHP soporta libcurl, una librer&iacute;a creada por Danile Stenberg, que + permite conexi&oacute;n y comunicaci&oacute;n con varios tipos de + servidores diferentes con varios tipos de protocolos diferentes. + libcurl actualmente soporta los portocolos http, https, ftp, gopher, + telnet, dict, file y ldap. libcurl tambi&eacute;n soporta certificados + HTTPS, HTTP POST, HTTP PUT, env&iacute;o por FTP (esto tambi&eacute;n + puede ser realizado con la extensi&oacute;n ftp de PHP), envío de archivos + tipo formulario HTTP, servidores proxy, cookies y autenticaci&oacute;n + usuario+contrase&ntilde;a. + </para> + <para> + Estas funciones fueron agregadas en 4.0.2. + </para> + </section> + + <section id="curl.requirements"> + &reftitle.required; + <para> + Para poder usar las funciones CURL deber&aacute; instalar el paquete <ulink + url="&url.curl;">CURL</ulink>. PHP requiere que use CURL 7.0.2-beta o superior. + PHP no funcionar&aacute; con una versi&oacute;n de CURL menor a 7.0.2-beta. + Desde la versi&oacute;n 4.2.3 de PHP se necesita, al menos, CURL 7.9.0 o superior. + </para> + </section> + + &reference.curl.configure; + + &reference.curl.constants; + + <section id="curl.examples"> + &reftitle.examples; + <para> + Una vez que hemos compilado PHP con soporte para CURL, podemos comenzar + a usar las funciones CURL. La idea b&aacute;sica tras las funciones CURL + es que inicialicemos una sesi&oacute;n CURL usando la funci&oacute;n + <function>curl_init</function>, luego podemos establecer las opciones para + la transferencia a trav&eacute;s de la funci&oacute;n <function>curl_setopt</function>, + y finalmente podemos ejecutar la sesi&oacute;n con la funci&oacute;n + <function>curl_exec</function> para luego cerrarla con <function>curl_close</function>. + Aqui hay un ejemplo que usa funciones CURL para traer el contenido de la p&aacute;gina de inicio + de example.com y guardarlo en un archivo: + <example> + <title>Usando el modulo CURL de PHP para traer la p&aacute;gina de inicio de example.com</title> + <programlisting role="php"> +<![CDATA[ +<?php -$ch = curl_init ("http://www.php.net/"); -$fp = fopen ("php_homepage.txt", "w"); +$ch = curl_init ("http://www.example.com/"); +$fp = fopen ("pagina_de_inicio.txt", "w"); -curl_setopt ($ch, CURLOPT_INFILE, $fp); +curl_setopt ($ch, CURLOPT_FILE, $fp); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_exec ($ch); curl_close ($ch); fclose ($fp); ?> - </programlisting> - </example> - </para> +]]> + </programlisting> + </example> + </para> + </section> </partintro> - + &reference.curl.functions; </reference> - <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -81,5 +92,7 @@ sgml-local-catalogs:nil sgml-local-ecat-files:nil End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 --> -

« previous php.doc.es (#180) next »