cvs: phpdoc-es /reference/curl reference.xml
| From: | Federico Finos | 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">
-<?php
+ <partintro>
+ <section id="curl.intro">
+ &reftitle.intro;
+ <para>
+ PHP soporta libcurl, una librería creada por Danile Stenberg, que
+ permite conexión y comunicació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én soporta certificados
+ HTTPS, HTTP POST, HTTP PUT, envío por FTP (esto también
+ puede ser realizado con la extensión ftp de PHP), envío de archivos
+ tipo formulario HTTP, servidores proxy, cookies y autenticación
+ usuario+contraseñ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á instalar el paquete <ulink
+ url="&url.curl;">CURL</ulink>. PHP requiere que use CURL 7.0.2-beta o
superior.
+ PHP no funcionará con una versión de CURL menor a 7.0.2-beta.
+ Desde la versió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ásica tras las funciones CURL
+ es que inicialicemos una sesión CURL usando la función
+ <function>curl_init</function>, luego podemos establecer las opciones para
+ la transferencia a través de la función
<function>curl_setopt</function>,
+ y finalmente podemos ejecutar la sesión con la funció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ágina de
inicio
+ de example.com y guardarlo en un archivo:
+ <example>
+ <title>Usando el modulo CURL de PHP para traer la pá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
-->
-