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

From: Date: Mon, 14 Nov 2005 21:24:16 +0000
Subject: cvs: peardoc /en/package/http/http-download intro.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-7164@lists.php.net to get a copy of this message
moosh Mon Nov 14 16:24:16 2005 EDT Modified files: /peardoc/en/package/http/http-download intro.xml Log: - prepare file before translation http://cvs.php.net/diff.php/peardoc/en/package/http/http-download/intro.xml?r1=1.5&r2=1.6&ty=u Index: peardoc/en/package/http/http-download/intro.xml diff -u peardoc/en/package/http/http-download/intro.xml:1.5 peardoc/en/package/http/http-download/intro.xml:1.6 --- peardoc/en/package/http/http-download/intro.xml:1.5 Fri Jun 10 06:30:59 2005 +++ peardoc/en/package/http/http-download/intro.xml Mon Nov 14 16:24:15 2005 @@ -1,40 +1,47 @@ -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> +<!-- Author : mike $ --> <refentry id="package.http.http-download.intro"> <refnamediv> <refname>Intro</refname> - <refpurpose>Introduction in usage of <classname>HTTP_Download</classname></refpurpose> + <refpurpose> + Introduction in usage of <classname>HTTP_Download</classname> + </refpurpose> </refnamediv> <refsect1 id="package.http.http-download.intro.details"> <title>Introduction</title> <para> - <classname>HTTP_Download</classname> provides an interface to easily send - any arbitrary data to HTTP clients. <classname>HTTP_Download</classname> - can gain its data from variables, files or stream resources. + <classname>HTTP_Download</classname> + provides an interface to easily send any arbitrary data to HTTP clients. + + <classname>HTTP_Download</classname> + can gain its data from variables, files or stream resources. </para> <para> - With this package you can easily handle (hidden) downloads. - Hidden means not accessible by the public - for - instance if you want to restrict access to particular downloads. + With this package you can easily handle (hidden) downloads. + + Hidden means not accessible by the public + + - for instance if you want to restrict access to particular downloads. </para> <para> - It supports HTTP compression, caching and partial downloads, - resuming and sending raw data, for example from database BLOBs. + It supports HTTP compression, caching and partial downloads, + resuming and sending raw data, for example from database BLOBs. </para> <para> <emphasis>ATTENTION:</emphasis> - You shouldn't use this package together with ob_gzhandler or - zlib.output_compression enabled in your php.ini, especially - if you want to send already gzipped data! + You shouldn't use this package together with ob_gzhandler or + zlib.output_compression enabled in your php.ini, especially + if you want to send already gzipped data! </para> <refsect2 id="package.http.http-download.intro.details.examples"> - <title>Usage Examples:</title> - <para> - Have a look at the following examples: - </para> - <example id="package.http.http-download.intro.details.examples.static"> - <title>Static send:</title> - <programlisting role="php"> + <title>Usage Examples:</title> + <para> + Have a look at the following examples: + </para> + <example id="package.http.http-download.intro.details.examples.static"> + <title>Static send:</title> + <programlisting role="php"> 1 $params = array( 2 'file' =&gt; '../hidden/download.tgz', 3 'contenttype' =&gt; 'application/x-gzip', @@ -42,11 +49,11 @@ 5 ); 6 7 $error = HTTP_Download::staticSend($params, false); - </programlisting> - </example> - <example id="package.http.http-download.intro.details.examples.file"> - <title>Send a hidden file:</title> - <programlisting role="php"> + </programlisting> + </example> + <example id="package.http.http-download.intro.details.examples.file"> + <title>Send a hidden file:</title> + <programlisting role="php"> 1 $dl = &amp;new HTTP_Download(); 2 $dl-&gt;setFile('../hidden/download.tgz'); 3 $dl-&gt;setContentDisposition(HTTP_DOWNLOAD_ATTACHMENT, 'latest.tgz'); @@ -55,43 +62,42 @@ 6 // else: 7 $dl-&gt;setContentType('application/x-gzip'); 8 $dl-&gt;send(); - </programlisting> - </example> - <example id="package.http.http-download.intro.details.examples.data"> - <title>Send arbitrary data:</title> - <programlisting role="php"> + </programlisting> + </example> + <example id="package.http.http-download.intro.details.examples.data"> + <title>Send arbitrary data:</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>Limiting bandwidth:</title> - <programlisting role="php"> + </programlisting> + </example> + <example id="package.http.http-download.intro.details.examples.throttle"> + <title>Limiting bandwidth:</title> + <programlisting role="php"> 1 $dl = &amp;new HTTP_Download(); 2 $dl->setFile('huge_file.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"> + </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> + </programlisting> + </example> </refsect2> </refsect1> - </refentry> <!-- Keep this comment at the end of the file Local variables: @@ -111,4 +117,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +-->

« previous php.pear.doc (#7164) next »