cvs: peardoc / manual.xml.in /en/core http.xml

From: Date: Tue, 18 Dec 2001 16:34:46 +0000
Subject: cvs: peardoc / manual.xml.in /en/core http.xml
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1612@lists.php.net to get a copy of this message
mj Tue Dec 18 11:34:46 2001 EDT Added files: /peardoc/en/core http.xml Modified files: /peardoc manual.xml.in Log: * Add chapter about HTTP functions in php4/pear. Index: peardoc/manual.xml.in diff -u peardoc/manual.xml.in:1.4 peardoc/manual.xml.in:1.5 --- peardoc/manual.xml.in:1.4 Mon Dec 17 10:55:17 2001 +++ peardoc/manual.xml.in Tue Dec 18 11:34:46 2001 @@ -38,6 +38,7 @@ <title>&Core;</title> &core.pear; &core.db; + &core.http; </part> <part id="packages"> Index: peardoc/en/core/http.xml +++ peardoc/en/core/http.xml <?xml encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <reference id="http"> <title>HTTP functions</title> <titleabbrev>PEAR HTTP</titleabbrev> <partintro> <simpara> </simpara> </partintro> <refentry id="core.http.http"> <refnamediv> <refname>HTTP</refname> <refpurpose>HTTP utility class</refpurpose> </refnamediv> <refsynopsisdiv> <synopsis>require_once "HTTP.php";</synopsis> </refsynopsisdiv> <refsect1> <title>Description</title> <simpara> HTTP utility functions. </simpara> </refsect1> <refsect1 id="core.http.http.date"> <title>HTTP::date</title> <funcsynopsis> <funcprototype> <funcdef>string <function>HTTP::date</function></funcdef> <paramdef>integer <parameter>time</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Format a RFC compliant HTTP header. This function honors the "y2k_compliance" php.ini directive. </para> <para> The parameter <parameter>time</parameter> has to be a UNIX timestamp that is converted to an RFC compliant date, which is returned by the function. </para> </refsect1> <refsect1 id="core.http.http.negotiateLanguage"> <title>HTTP::negotiateLanguage</title> <funcsynopsis> <funcprototype> <funcdef>string <function>HTTP::negotiateLanguage</function></funcdef> <paramdef>array <parameter>supported</parameter></paramdef> <paramdef>string <parameter>default</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Negotiate language with the user's browser through the Accept-Language HTTP header or the user's host address. Language codes are generally in the form "ll" for a language spoken in only one country, or "ll_CC" for a language spoken in a particular country. For example, U.S. English is "en_US", while British English is "en_UK". Portugese as spoken in Portugal is "pt_PT", while Brazilian Portugese is "pt_BR". Two-letter country codes can be found in the ISO 3166 standard. </para> <para> Quantities in the Accept-Language: header are supported, for example: </para> <para> <programlisting> Accept-Language: en_UK;q=0.7, en_US;q=0.6, no;q=1.0, dk;q=0.8 </programlisting> </para> <para> The first parameter <parameter>supported</parameter> is an associative array indexed by language codes (country codes) supported by the application. Values must evaluate to true. </para> <para> The second parameter <parameter>default</parameter> is the default language that should be used when if none of the other languages is found during negotiation. The default value for this parameter is "en_US" for U.S. English. </para> </refsect1> </refentry> <refentry id="core.http.compress"> <refnamediv> <refname>Compress</refname> <refpurpose>HTTP compression</refpurpose> </refnamediv> <refsynopsisdiv> <synopsis> require_once "HTTP/Compress.php"; HTTP_Compress::start(); /** Your output goes here */ HTTP_Compress::output(); </synopsis> </refsynopsisdiv> <refsect1> <title>Description</title> <simpara></simpara> </refsect1> <refsect1 id="core.http.compress.start"> <title>HTTP_Compress::start</title> <funcsynopsis> <funcprototype> <funcdef>void <function>HTTP_Compress::start</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> <para> Start the output buffer, and make sure that implicit flush is off so that data is always buffered. </para> </refsect1> <refsect1 id="core.http.compress.output"> <title>HTTP_Compress::output</title> <funcsynopsis> <funcprototype> <funcdef>void <function>HTTP_Compress::output</function></funcdef> <paramdef>boolean <parameter><optional>compress</optional></parameter></paramdef> <paramdef>boolean <parameter><optional>use_etag</optional></parameter></paramdef> <paramdef>boolean <parameter><optional>send_body</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> Output the contents of the output buffer, compressed if desired, along with any relevant headers. </para> <para> The first parameter <parameter>compress</parameter> defines if gzip compression should be used. (Note: The browser of the user has to support gzip also). The second parameter <parameter> use_etag</parameter> defines wether to generate an ETag, and don't send the body if the browser has the same object cached. <parameter>send_body</parameter> determines wether to send the body of the request? (Might be false for HEAD requests.) </para> </refsect1> </refentry> </reference> <!-- 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.cvs (#1612) next »