cvs: peardoc /fr/package/http/http-download intro.xml

From: Date: Mon, 14 Nov 2005 22:31:46 +0000
Subject: cvs: peardoc /fr/package/http/http-download intro.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-7165@lists.php.net to get a copy of this message
moosh Mon Nov 14 17:31:46 2005 EDT Added files: /peardoc/fr/package/http/http-download intro.xml Log: - initial translation from 1.6 http://cvs.php.net/co.php/peardoc/fr/package/http/http-download/intro.xml?r=1.1&p=1 Index: peardoc/fr/package/http/http-download/intro.xml +++ peardoc/fr/package/http/http-download/intro.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.6 Maintainer: moosh Status: ready --> <!-- EN-Author: mike --> <refentry id="package.http.http-download.intro"> <refnamediv> <refname>Intro</refname> <refpurpose> Introduction à l'utilisation de <classname>HTTP_Download</classname> </refpurpose> </refnamediv> <refsect1 id="package.http.http-download.intro.details"> <title>Introduction</title> <para> <classname>HTTP_Download</classname> fournit une interface pour envoyer facilement n'importe quelles données arbitraires aux clients HTTP. <classname>HTTP_Download</classname> can gain its data from variables, files or stream resources. </para> <para> Avec ce paquet vous pouvez facilement manipuler des téléchargements (cachés). Caché signifiant non accessibles par le public - par exemple si vous voulez limiter l'accès à certains téléchargements. </para> <para> Il supporte la compression de HTTP, la mise en cache, les téléchargements partiels, la reprise et l'envoi de données brutes, par exemple depuis des BLOBs de base de données. </para> <para> <emphasis>ATTENTION:</emphasis> Vous ne devriez pas employer ce paquet en même temps que ob_gzhandler ou zlib.output_compression activé dans votre php.ini, particulièrement si vous voulez envoyer des données déjà gzippée ! </para> <refsect2 id="package.http.http-download.intro.details.examples"> <title>Examples d'utilisation:</title> <para> Jetez un oeil aux exemples suivants: </para> <example id="package.http.http-download.intro.details.examples.static"> <title>Envoi Statique:</title> <programlisting role="php"> 1 $params = array( 2 'file' =&gt; '../repertoireHorsVue/aTelecharger.tgz', 3 'contenttype' =&gt; 'application/x-gzip', 4 'contentdisposition' =&gt; array(HTTP_DOWNLOAD_ATTACHMENT, 'latest.tgz'), 5 ); 6 7 $error = HTTP_Download::staticSend($params, false); </programlisting> </example> <example id="package.http.http-download.intro.details.examples.file"> <title>Envoi d'un fichier caché:</title> <programlisting role="php"> 1 $dl = &amp;new HTTP_Download(); 2 $dl-&gt;setFile('../repertoireHorsVue/aTelecharger.tgz'); 3 $dl-&gt;setContentDisposition(HTTP_DOWNLOAD_ATTACHMENT, 'latest.tgz'); 4 // avec ext/magic.mime 5 // $dl-&gt;guessContentType(); 6 // sinon: 7 $dl-&gt;setContentType('application/x-gzip'); 8 $dl-&gt;send(); </programlisting> </example> <example id="package.http.http-download.intro.details.examples.data"> <title>Envoi de données arbitraire:</title> <programlisting role="php"> 1 $dl = &amp;new HTTP_Download(); 2 $dl-&gt;setData($data); 3 $dl-&gt;setLastModified($unix_timestamp); 4 $dl-&gt;setContentType('application/x-gzip'); 5 $dl-&gt;setContentDisposition(HTTP_DOWNLOAD_ATTACHMENT, 'latest.tgz'); 6 $dl-&gt;send(); </programlisting> </example> <example id="package.http.http-download.intro.details.examples.throttle"> <title>Limitation de bande passante:</title> <programlisting role="php"> 1 $dl = &amp;new HTTP_Download(); 2 $dl->setFile('gros_fichier.bin'); 3 $dl->setBufferSize(25 * 1024); // 25 K 4 $dl->setThrottleDelay(1); // 1 sec 5 $dl->send(); </programlisting> </example> <example id="package.http.http-download.intro.details.examples.pglob"> <title>Sending a PostgreSQL LOB:</title> <programlisting role="php"> 1 require_once 'HTTP/Download.php'; 2 require_once 'HTTP/Download/PgLOB.php'; 3 $dl = &amp;new HTTP_Download(); 4 $dl->setResource( 5 HTTP_Download_PgLOB::open(pg_connect('dbname=lobs'), 12345)); 6 $dl->send(); </programlisting> </example> </refsect2> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil 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.pear.doc (#7165) next »