- duh, somehow that didn't get through the last time

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@216967 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Michael Wallner 2006-07-24 11:35:01 +00:00
parent 0871421b19
commit 81c3521be8
53 changed files with 7522 additions and 882 deletions

View file

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-cache-etag">
<refnamediv>
<refname>http_cache_etag</refname>
<refpurpose>Caching by ETag</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>http_cache_etag</methodname>
<methodparam choice="opt"><type>string</type><parameter>etag</parameter></methodparam>
</methodsynopsis>
<para>
Attempts to cache the sent entity by its ETag, either supplied or generated
by the hash algorithm specified by the
<link linkend="http.configuration">INI setting <literal>http.etag.mode</literal></link>.
</para>
<para>
If the clients <literal>If-None-Match</literal> header matches the supplied/calculated
ETag, the body is considered cached on the clients side and
a <literal>304 Not Modified</literal> status code is issued.
</para>
<para>
A log entry is written to the cache log if the
<link linkend="http.configuration">INI entry <literal>http.log.cache</literal></link>
is set and the cache attempt was successful.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>etag</parameter></term>
<listitem>
<para>
Custom ETag
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns FALSE on failure, or <emphasis>exits</emphasis> with <literal>304 Not Modified</literal> if the entity is cached.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_cache_etag</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,156 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-cache-last-modified">
<refnamediv>
<refname>http_cache_last_modified</refname>
<refpurpose>Caching by last modification</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>http_cache_last_modified</methodname>
<methodparam choice="opt"><type>int</type><parameter>timestamp_or_expires</parameter></methodparam>
</methodsynopsis>
<para>
Attempts to cache the sent entity by its last modification date.
</para>
<para>
If the supplied argument is greater than 0, it is handled as timestamp
and will be sent as date of last modification. If it is 0 or omitted,
the current time will be sent as Last-Modified date. If it's negative,
it is handled as expiration time in seconds, which means that if the
requested last modification date is not between the calculated timespan,
the <literal>Last-Modified</literal> header is updated and the actual body will be sent.
</para>
<para>
A log entry will be written to the cache log if the
&link.http.configuration; <literal>http.log.cache</literal>
is set and the cache attempt was successful.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>timestamp_or_expires</parameter></term>
<listitem>
<para>
Unix timestamp
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns FALSE on failure, or <emphasis>exits</emphasis> with <literal>304 Not Modified</literal> if the entity is cached.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_cache_last_modified</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-chunked-decode">
<refnamediv>
<refname>http_chunked_decode</refname>
<refpurpose>Decode chunked-encoded data</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_chunked_decode</methodname>
<methodparam><type>string</type><parameter>encoded</parameter></methodparam>
</methodsynopsis>
<para>
Decodes a string which is HTTP-chunked encoded.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>encoded</parameter></term>
<listitem>
<para>
Chunked encoded string
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the decoded string on success or FALSE on failure.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_chunked_decode</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-deflate">
<refnamediv>
<refname>http_deflate</refname>
<refpurpose>Deflate data</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_deflate</methodname>
<methodparam choice="opt"><type>string</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags = 0</parameter></methodparam>
</methodsynopsis>
<para>
Compress data with <literal>gzip</literal>, <literal>zlib</literal> AKA <literal>deflate</literal> or <literal>raw deflate</literal> encoding.
</para>
<para>
See the <link linkend="http.constants.deflate">deflate constants table</link> for possible values for the <varname>flags</varname> parameter.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
String containing the data that should be encoded
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem>
<para>
Deflate options
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the encoded string on success, or NULL on failure.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_deflate</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-inflate">
<refnamediv>
<refname>http_inflate</refname>
<refpurpose>Inflate data</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_inflate</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<para>
Decompress data compressed with either <literal>gzip</literal>, <literal>deflate</literal> AKA <literal>zlib</literal> or <literal>raw
deflate</literal> encoding.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
String containing the compressed data
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the decoded string on success, or NULL on failure.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_inflate</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -1,273 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.31 $ -->
<!-- splitted from ./en/functions/http.xml, last change in rev 1.2 -->
<refentry id="function.header">
<refnamediv>
<refname>header</refname>
<refpurpose>Send a raw HTTP header</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>header</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>replace</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>http_response_code</parameter></methodparam>
</methodsynopsis>
<para>
<function>header</function> is used to send a raw
<acronym>HTTP</acronym> header. See the <ulink
url="&url.rfc;2616">HTTP/1.1 specification</ulink> for more
information on <acronym>HTTP</acronym> headers.
</para>
<note>
<para>
Since PHP 4.4.2 and PHP 5.1.2 this function prevents more than one
header to be sent at once as a protection against header injection
attacks.
</para>
</note>
<para>
The optional <parameter>replace</parameter> parameter indicates
whether the header should replace a previous similar header, or
add a second header of the same type. By default it will replace,
but if you pass in &false; as the second argument you can force
multiple headers of the same type. For example:
</para>
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
header('WWW-Authenticate: Negotiate');
header('WWW-Authenticate: NTLM', false);
?>
]]>
</programlisting>
</informalexample>
</para>
<para>
The second optional <parameter>http_response_code</parameter> force the
HTTP response code to the specified value. (This parameter is available
in PHP 4.3.0 and higher.)
</para>
<para>
There are two special-case header calls. The first is a header
that starts with the string "<literal>HTTP/</literal>" (case is not
significant), which will be used to figure out the HTTP status
code to send. For example, if you have configured Apache to
use a PHP script to handle requests for missing files (using
the <literal>ErrorDocument</literal> directive), you may want to
make sure that your script generates the proper status code.
</para>
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
header("HTTP/1.0 404 Not Found");
?>
]]>
</programlisting>
</informalexample>
</para>
<note>
<para>
The HTTP status header line will always be the first sent
to the client, regardless of the actual <function>header</function>
call being the first or not. The status may be overridden
by calling <function>header</function> with a new status line
at any time unless the HTTP headers have already been sent.
</para>
</note>
<para>
The second special case is the "Location:" header. Not only does
it send this header back to the browser, but it also returns a
<literal>REDIRECT</literal> (302) status code to the browser unless
some <literal>3xx</literal> status code has already been set.
</para>
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
header("Location: http://www.example.com/"); /* Redirect browser */
/* Make sure that code below does not get executed when we redirect. */
exit;
?>
]]>
</programlisting>
</informalexample>
</para>
<note>
<para>
HTTP/1.1 requires an absolute <acronym>URI</acronym> as argument to
<ulink url="&spec.http1.1;-sec14.html#sec14.30">Location:</ulink>
including the scheme, hostname and absolute path, but
some clients accept relative URIs. You can usually use
<literal>$_SERVER['HTTP_HOST']</literal>, <literal>$_SERVER['PHP_SELF']</literal>
and <function>dirname</function> to make an absolute URI from a
relative one yourself:
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
/* Redirect to a different page in the current directory that was requested */
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra = 'mypage.php';
header("Location: http://$host$uri/$extra");
exit;
?>
]]>
</programlisting>
</informalexample>
</para>
</note>
<note>
<para>
Session ID is not passed with Location header even if <link
linkend="ini.session.use-trans-sid">session.use_trans_sid</link> is
enabled. It must by passed manually using <constant>SID</constant>
constant.
</para>
</note>
<para>
PHP scripts often generate dynamic content that must not be cached
by the client browser or any proxy caches between the server and the
client browser. Many proxies and clients can be forced to disable
caching with:
</para>
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?>
]]>
</programlisting>
</informalexample>
</para>
<note>
<para>
You may find that your pages aren't cached even if you don't
output all of the headers above. There are a number of options
that users may be able to set for their browser that change its
default caching behavior. By sending the headers above, you should
override any settings that may otherwise cause the output of your
script to be cached.
</para>
<para>
Additionally, <function>session_cache_limiter</function> and
the <literal>session.cache_limiter</literal> configuration
setting can be used to automatically generate the correct
caching-related headers when sessions are being used.
</para>
</note>
<para>
Remember that <function>header</function> must be
called before any actual output is sent, either by normal HTML
tags, blank lines in a file, or from PHP. It is a very common
error to read code with <function>include</function>, or
<function>require</function>, functions, or another file access
function, and have spaces or empty lines that are output before
<function>header</function> is called. The same problem exists
when using a single PHP/HTML file.
</para>
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
<html>
<?php
/* This will give an error. Note the output
* above, which is before the header() call */
header('Location: http://www.example.com/');
?>
]]>
</programlisting>
</informalexample>
</para>
<note>
<para>
As of PHP 4, you can use output buffering to get around this problem,
with the overhead of all of your output to the browser being buffered
in the server until you send it. You can do this by calling
<function>ob_start</function> and <function>ob_end_flush</function>
in your script, or setting the <literal>output_buffering</literal>
configuration directive on in your &php.ini; or
server configuration files.
</para>
</note>
<para>
If you want the user to be prompted to save the data you are
sending, such as a generated PDF file, you can use the <ulink
url="&url.rfc;2183">Content-Disposition</ulink> header to
supply a recommended filename and force the browser to display the
save dialog.
</para>
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
// We'll be outputting a PDF
header('Content-type: application/pdf');
// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');
// The PDF source is in original.pdf
readfile('original.pdf');
?>
]]>
</programlisting>
</informalexample>
</para>
<note>
<para>
There is a bug in Microsoft Internet Explorer 4.01 that prevents
this from working. There is no workaround. There is also a bug
in Microsoft Internet Explorer 5.5 that interferes with this,
which can be resolved by upgrading to Service Pack 2 or later.
</para>
</note>
<note>
<simpara>
If <link linkend="ini.safe-mode">safe mode</link> is enabled the
uid of the script is added to the <literal>realm</literal> part
of the <literal>WWW-Authenticate</literal> header if you set
this header (used for HTTP Authentication).
</simpara>
</note>
<para>
See also <function>headers_sent</function>,
<function>setcookie</function>, and the section on
<link linkend="features.http-auth">HTTP authentication</link>.
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -1,90 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<refentry id="function.headers-list">
<refnamediv>
<refname>headers_list</refname>
<refpurpose>Returns a list of response headers sent (or ready to send)</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>headers_list</methodname>
<void/>
</methodsynopsis>
<simpara>
<function>headers_list</function> will return a numerically indexed array
of headers to be sent to the browser / client. To determine whether or not
these headers have been sent yet, use <function>headers_sent</function>.
</simpara>
<para>
<example>
<title>Examples using <function>headers_list</function></title>
<programlisting role="php">
<![CDATA[
<?php
/* setcookie() will add a response header on its own */
setcookie('foo', 'bar');
/* Define a custom response header
This will be ignored by most clients */
header("X-Sample-Test: foo");
/* Specify plain text content in our response */
header('Content-type: text/plain');
/* What headers are going to be sent? */
var_dump(headers_list());
?>
]]>
</programlisting>
<para>
this will output :
</para>
<screen>
<![CDATA[
array(4) {
[0]=>
string(23) "X-Powered-By: PHP/5.1.3"
[1]=>
string(19) "Set-Cookie: foo=bar"
[2]=>
string(18) "X-Sample-Test: foo"
[3]=>
string(24) "Content-type: text/plain"
}
]]>
</screen>
</example>
</para>
<simpara>
See Also:
<function>headers_sent</function>,
<function>header</function>, and
<function>setcookie</function>.
</simpara>
</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
indent-tabs-mode:nil
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
-->

View file

@ -1,97 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.17 $ -->
<!-- splitted from ./en/functions/http.xml, last change in rev 1.7 -->
<refentry id="function.headers-sent">
<refnamediv>
<refname>headers_sent</refname>
<refpurpose>Checks if or where headers have been sent</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>headers_sent</methodname>
<methodparam choice="opt"><type>string</type><parameter role="reference">file</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter role="reference">line</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>headers_sent</function> will return &false; if no HTTP headers
have already been sent or &true; otherwise. If the optional
<parameter>file</parameter> and <parameter>line</parameter> parameters
are set, <function>headers_sent</function> will put the PHP source
file name and line number where output started in the <parameter>file</parameter>
and <parameter>line</parameter> variables.
</simpara>
<simpara>
You can't add any more header lines using the <function>header</function>
function once the header block has already been sent. Using this function
you can at least prevent getting HTTP header related error messages.
Another option is to use <link linkend="ref.outcontrol">Output Buffering</link>.
</simpara>
<note>
<simpara>
The optional <parameter>file</parameter> and <parameter>line</parameter>
parameters were added in PHP 4.3.0.
</simpara>
</note>
<para>
<example>
<title>Examples using <function>headers_sent</function></title>
<programlisting role="php">
<![CDATA[
<?php
// If no headers are sent, send one
if (!headers_sent()) {
header('Location: http://www.example.com/');
exit;
}
// An example using the optional file and line parameters, as of PHP 4.3.0
// Note that $filename and $linenum are passed in for later use.
// Do not assign them values beforehand.
if (!headers_sent($filename, $linenum)) {
header('Location: http://www.example.com/');
exit;
// You would most likely trigger an error here.
} else {
echo "Headers already sent in $filename on line $linenum\n" .
"Cannot redirect, for now please click this <a " .
"href=\"http://www.example.com\">link</a> instead\n";
exit;
}
?>
]]>
</programlisting>
</example>
</para>
<para>
See also <function>ob_start</function>, <function>trigger_error</function>,
and <function>header</function> for a more detailed discussion of the
matters involved.
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-build-cookie">
<refnamediv>
<refname>http_build_cookie</refname>
<refpurpose>Build cookie string</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_build_cookie</methodname>
<methodparam><type>array</type><parameter>cookie</parameter></methodparam>
</methodsynopsis>
<para>
Build a cookie string from an array/object like returned by <function>http_parse_cookie</function>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>cookie</parameter></term>
<listitem>
<para>
a cookie list like returned from <function>http_parse_cookie</function>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the cookie(s) as string.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_build_cookie</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-date">
<refnamediv>
<refname>http_date</refname>
<refpurpose>Compose HTTP RFC compliant date</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_date</methodname>
<methodparam choice="opt"><type>int</type><parameter>timestamp</parameter></methodparam>
</methodsynopsis>
<para>
Compose a valid HTTP date regarding RFC 1123
looking like: <literal>Wed, 22 Dec 2004 11:34:47 GMT</literal>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>timestamp</parameter></term>
<listitem>
<para>
Unix timestamp
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the HTTP date as string.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_date</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-get-request-body-stream">
<refnamediv>
<refname>http_get_request_body_stream</refname>
<refpurpose>Get request body as stream</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>resource</type><methodname>http_get_request_body_stream</methodname>
<void/>
</methodsynopsis>
<para>
Create a stream to read the raw request body (e.g. POST or PUT data).
</para>
<para>
This function can only be used once if the request method was another than POST.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the raw request body as stream on success or NULL on failure.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_get_request_body_stream</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-get-request-body">
<refnamediv>
<refname>http_get_request_body</refname>
<refpurpose>Get request body as string</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_get_request_body</methodname>
<void/>
</methodsynopsis>
<para>
Get the raw request body (e.g. POST or PUT data).
</para>
<para>
This function can not be used after
<link linkend="function.http-get-request-body-stream"><function>http_get_request_body_stream</function></link>
if the request method was another than POST.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the raw request body as string on success or NULL on failure.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_get_request_body</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-get-request-headers">
<refnamediv>
<refname>http_get_request_headers</refname>
<refpurpose>Get request headers as array</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>http_get_request_headers</methodname>
<void/>
</methodsynopsis>
<para>
Get a list of incoming HTTP headers.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an associative array of incoming request headers.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_get_request_headers</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,152 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-match-etag">
<refnamediv>
<refname>http_match_etag</refname>
<refpurpose>Match ETag</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>http_match_etag</methodname>
<methodparam choice="opt"><type>string</type><parameter>etag</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>for_range = FALSE</parameter></methodparam>
</methodsynopsis>
<para>
Matches the given <emphasis>ETag</emphasis> against the clients <literal>If-Match</literal> resp.
<literal>If-None-Match</literal> HTTP headers.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>etag</parameter></term>
<listitem>
<para>
The ETag to match
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>for_range</parameter></term>
<listitem>
<para>
If set to TRUE, the header usually used to validate HTTP ranges will be checked
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns TRUE if ETag matches or the header contained the asterisk (&quot;*&quot;), else FALSE.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_match_etag</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-match-modified">
<refnamediv>
<refname>http_match_modified</refname>
<refpurpose>Match last modification</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>http_match_modified</methodname>
<methodparam choice="opt"><type>int</type><parameter>timestamp</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>for_range = FALSE</parameter></methodparam>
</methodsynopsis>
<para>
Matches the given unix timestamp against the clients "If-Modified-Since"
resp. "If-Unmodified-Since" HTTP headers.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>timestamp</parameter></term>
<listitem>
<para>
Unix timestamp; current time, if omitted
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>for_range</parameter></term>
<listitem>
<para>
If set to TRUE, the header usually used to validate HTTP ranges will be checked
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>false</parameter></term>
<listitem>
<para>
Its description
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns TRUE if timestamp represents an earlier date than the header, else FALSE.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_match_modified</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-match-request-header">
<refnamediv>
<refname>http_match_request_header</refname>
<refpurpose>Match any header</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>http_match_request_header</methodname>
<methodparam><type>string</type><parameter>header</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>match_case = FALSE</parameter></methodparam>
</methodsynopsis>
<para>
Match an incoming HTTP header.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>header</parameter></term>
<listitem>
<para>
The header name (case-insensitive)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>value</parameter></term>
<listitem>
<para>
The header value that should be compared
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>match_case</parameter></term>
<listitem>
<para>
Whether the value should be compared case sensitively
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns TRUE if header value matches, else FALSE.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_match_request_header</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,147 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-support">
<refnamediv>
<refname>http_support</refname>
<refpurpose>Check builtin HTTP support</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>http_support</methodname>
<methodparam choice="opt"><type>int</type><parameter>feature = 0</parameter></methodparam>
</methodsynopsis>
<para>
Check for features that require external libraries.
</para>
<para>
See the <link linkend="http.constants.support">feature support constants table</link>
for possible values for the <varname>feature</varname> argument.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>feature</parameter></term>
<listitem>
<para>
Feature to probe for; if the parameter is 0 or omitted, the return value contains a bitmask of
all supported features that depend on external libraries
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns int, whether requested feature is supported, or a bitmask with all supported features.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_support</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-negotiate-charset">
<refnamediv>
<refname>http_negotiate_charset</refname>
<refpurpose>Negotiate clients preferred character set</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_negotiate_charset</methodname>
<methodparam choice="opt"><type>array</type><parameter>supported</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">result</parameter></methodparam>
</methodsynopsis>
<para>
This function negotiates the clients preferred charset based on its
<literal>Accept-Charset</literal> HTTP header. The qualifier is recognized and charsets
without qualifier are rated highest.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>supported</parameter></term>
<listitem>
<para>
Array containing the supported charsets as values
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>result</parameter></term>
<listitem>
<para>
Will be filled with an array containing the negotiation results
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the negotiated charset or the default charset (i.e. first array entry) if none match.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Using <function>http_negotiate_charset</function></title>
<programlisting role="php">
<![CDATA[
<?php
$charsets = array(
'iso-8859-1', // default
'iso-8859-2',
'iso-8859-15',
'utf-8'
);
$pref = http_negotiate_charset($charsets, $result);
if (strcmp($pref, 'iso-8859-1')) {
iconv_set_encoding('internal_encoding', 'iso-8859-1');
iconv_set_encoding('output_encoding', $pref);
ob_start('ob_iconv_handler');
}
print_r($result);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-negotiate-ctype">
<refnamediv>
<refname>http_negotiate_ctype</refname>
<refpurpose>Negotiate clients preferred content type</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_negotiate_ctype</methodname>
<methodparam choice="opt"><type>array</type><parameter>supported</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">result</parameter></methodparam>
</methodsynopsis>
<para>
This function negotiates the clients preferred content type based on its
<literal>Accept</literal> HTTP header. The qualifier is recognized and content types
without qualifier are rated highest.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>supported</parameter></term>
<listitem>
<para>
Array containing the supported content types as values
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>result</parameter></term>
<listitem>
<para>
Will be filled with an array containing the negotiation results
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the negotiated content type or the default content type (i.e. first array entry) if none match.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Using <function>http_negotiate_ctype</function></title>
<programlisting role="php">
<![CDATA[
<?php
$ctypes = array('application/xhtml+xml', 'text/html');
http_send_content_type(http_negotiate_content_type($ctypes));
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-negotiate-language">
<refnamediv>
<refname>http_negotiate_language</refname>
<refpurpose>Negotiate clients preferred language</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_negotiate_language</methodname>
<methodparam choice="opt"><type>array</type><parameter>supported</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">result</parameter></methodparam>
</methodsynopsis>
<para>
This function negotiates the clients preferred language based on its
<literal>Accept-Language</literal> HTTP header. The qualifier is recognized and languages
without qualifier are rated highest. The qualifier will be decreased by
10% for partial matches (i.e. matching primary language).
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>supported</parameter></term>
<listitem>
<para>
Array containing the supported languages as values
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>result</parameter></term>
<listitem>
<para>
Will be filled with an array containing the negotiation results
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the negotiated language or the default language (i.e. first array entry) if none match.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Using <function>http_negotiate_language</function></title>
<programlisting role="php">
<![CDATA[
<?php
$langs = array(
'en-US',// default
'fr',
'fr-FR',
'de',
'de-DE',
'de-AT',
'de-CH',
);
include './langs/'. http_negotiate_language($langs, $result) .'.php';
print_r($result);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.ob-deflatehandler">
<refnamediv>
<refname>ob_deflatehandler</refname>
<refpurpose>Deflate output handler</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>ob_deflatehandler</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
<para>
For use with <link linkend="function.ob-start"><function>ob_start</function></link>.
</para>
<para>
The deflate output buffer handler can only be used once.
</para>
<para>
It conflicts with ob_gzhandler and zlib.output_compression as well and should
not be used after ext/mbstrings mb_output_handler and ext/sessions URL-Rewriter (AKA
session.use_trans_sid).
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>ob_deflatehandler</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.ob-etaghandler">
<refnamediv>
<refname>ob_etaghandler</refname>
<refpurpose>ETag output handler</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>ob_etaghandler</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
<para>
For use with <link linkend="function.ob-start"><function>ob_start</function></link>.
</para>
<para>
Output buffer handler generating an ETag with the hash algorithm specified with the
&link.http.configuration; <literal>http.etag.mode</literal>.
</para>
<para>
This output handler is used by <link linkend="function.http-cache-etag"><function>http_cache_etag</function></link>.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>ob_etaghandler</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.ob-inflatehandler">
<refnamediv>
<refname>ob_inflatehandler</refname>
<refpurpose>Inflate output handler</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>ob_inflatehandler</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
<para>
For use with <link linkend="function.ob-start"><function>ob_start</function></link>.
</para>
<para>
Same restrictions as with <link linkend="function.ob-deflatehandler"><function>ob_deflatehandler</function></link> apply.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>ob_inflatehandler</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,169 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-parse-cookie">
<refnamediv>
<refname>http_parse_cookie</refname>
<refpurpose>Parse HTTP cookie</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>object</type><methodname>http_parse_cookie</methodname>
<methodparam choice="opt"><type>string</type><parameter>cookie</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>allowed_extras</parameter></methodparam>
</methodsynopsis>
<para>
Parses HTTP cookies like sent in a response into a struct.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>cookie</parameter></term>
<listitem>
<para>
String containing the value of a <literal>Set-Cookie</literal> response header
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem>
<para>
Parse flags
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>allowed_extras</parameter></term>
<listitem>
<para>
Array containing recognized <emphasis>extra</emphasis> keys.
By default all unkown keys will be treated as cookie names.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an stdClass olike shown in the example on success or FALSE on failure.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Using <function>http_parse_cookie</function></title>
<programlisting role="php">
<![CDATA[
<?php
print_r(http_parse_cookie("foo=bar; bar=baz; path=/; domain=example.com; comment=; secure", 0, array("comment")));
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
stdClass Object
(
[cookies] => Array
(
[foo] => bar
[bar] => baz
)
[extras] => Array
(
[comment] =>
)
[flags] => 16
[expires] => 0
[path] => /
[domain] => example.com
)
]]>
</screen>
</example>
</para>
</refsect1>
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-parse-headers">
<refnamediv>
<refname>http_parse_headers</refname>
<refpurpose>Parse HTTP headers</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>http_parse_headers</methodname>
<methodparam><type>string</type><parameter>header</parameter></methodparam>
</methodsynopsis>
<para>
Parses HTTP headers into an associative array.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>header</parameter></term>
<listitem>
<para>
String containing HTTP headers
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an array on success, or FALSE on failure.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Using <function>http_parse_headers</function></title>
<programlisting role="php">
<![CDATA[
<?php
$headers = "content-type: text/html; charset=UTF-8\r\n".
"Server: Funky/1.0\r\n".
"Set-Cookie: foo=bar\r\n".
"Set-Cookie: baz=quux\r\n".
"Folded: works\r\n\ttoo\r\n";
print_r(http_parse_headers($headers));
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Array
(
[Content-Type] => text/html; chatset=UTF-8
[Server] => Funky/1.0
[Set-Cookie] => Array
(
[0] => foo=bar
[1] => baz=quux
)
[Folded] => works
too
)
]]>
</screen>
</example>
</para>
</refsect1>
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-parse-message">
<refnamediv>
<refname>http_parse_message</refname>
<refpurpose>Parse HTTP message
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>object</type><methodname>http_parse_message</methodname>
<methodparam><type>string</type><parameter>message</parameter></methodparam>
</methodsynopsis>
<para>
Parses (a) http_message(s) into a simple recursive object structure.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>message</parameter></term>
<listitem>
<para>
String containing a single HTTP message or several consecutive HTTP messages
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an hierarchical object structure of the parsed messages.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Using <function>http_parse_message</function> </title>
<programlisting role="php">
<![CDATA[
<?php
print_r(http_parse_message(http_get(URL, array('redirect' => 3)));
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
stdClass object
(
[type] => 2
[httpVersion] => 1.1
[responseCode] => 200
[headers] => Array
(
[Content-Length] => 3
[Server] => Apache
)
[body] => Hi!
[parentMessage] => stdClass object
(
[type] => 2
[httpVersion] => 1.1
[responseCode] => 302
[headers] => Array
(
[Content-Length] => 0
[Location] => ...
)
[body] =>
[parentMessage] => ...
)
)
]]>
</screen>
</example>
</para>
</refsect1>
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-parse-params">
<refnamediv>
<refname>http_parse_params</refname>
<refpurpose>Parse parameter list</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>object</type><methodname>http_parse_params</methodname>
<methodparam choice="opt"><type>string</type><parameter>param</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags = HTTP_PARAMS_DEFAULT</parameter></methodparam>
</methodsynopsis>
<para>
Parse parameter list.
</para>
<para>
See the <link linkend="http.constants.params">params parsing constants table</link> for possible
values of the <varname>flags</varname> argument.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>param</parameter></term>
<listitem>
<para>
Parameters
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem>
<para>
Parse flags
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns parameter list.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_parse_params</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,375 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-get">
<refnamediv>
<refname>http_get</refname>
<refpurpose>Perform GET request</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_get</methodname>
<methodparam choice="opt"><type>string</type><parameter>url</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">info</parameter></methodparam>
</methodsynopsis>
<para>
Performs an HTTP GET request on the supplied url.
</para>
<para>
The second parameter, if set, is expected to be an associative
array where the following options will be recognized:
</para>
<para id="http.request.options">
<table>
<title>HTTP request options</title>
<tgroup cols="3">
<thead>
<row>
<entry>Name</entry>
<entry>Type</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>redirect</entry><entry>int</entry><entry>whether and how many redirects to follow</entry>
</row>
<row>
<entry>unrestrictedauth</entry><entry>bool</entry><entry>whether to continue sending credentials on redirects to a different host</entry>
</row>
<row>
<entry>proxyhost</entry><entry>string</entry><entry>proxy host in &quot;host[:port]&quot; format</entry>
</row>
<row>
<entry>proxyport</entry><entry>int</entry><entry>use another proxy port as specified in proxyhost</entry>
</row>
<row>
<entry>proxytype</entry><entry>int</entry><entry><constant>HTTP_PROXY_HTTP</constant>, <constant>HTTP_PROXY_SOCKS4</constant> or <constant>HTTP_PROXY_SOCKS5</constant></entry>
</row>
<row>
<entry>proxyauth</entry><entry>string</entry><entry>proxy credentials in &quot;user:pass&quot; format</entry>
</row>
<row>
<entry>proxyauthtype</entry><entry>int</entry><entry><constant>HTTP_AUTH_BASIC</constant> and/or <constant>HTTP_AUTH_NTLM</constant></entry>
</row>
<row>
<entry>httpauth</entry><entry>string</entry><entry>http credentials in &quot;user:pass&quot; format</entry>
</row>
<row>
<entry>httpauthtype</entry><entry>int</entry><entry><constant>HTTP_AUTH_BASIC</constant>, <constant>HTTP_AUTH_DIGEST</constant> and/or <constant>HTTP_AUTH_NTLM</constant></entry>
</row>
<row>
<entry>compress</entry><entry>bool</entry><entry>whether to allow gzip/deflate content encoding</entry>
</row>
<row>
<entry>port</entry><entry>int</entry><entry>use another port as specified in the url</entry>
</row>
<row>
<entry>referer</entry><entry>string</entry><entry>the referer to send</entry>
</row>
<row>
<entry>useragent</entry><entry>string</entry><entry>the user agent to send (defaults to PECL::HTTP/version (PHP/version)))</entry>
</row>
<row>
<entry>headers</entry><entry>array</entry><entry>list of custom headers as associative array like array(&quot;header&quot; => &quot;value&quot;)</entry>
</row>
<row>
<entry>cookies</entry><entry>array</entry><entry>list of cookies as associative array like array(&quot;cookie&quot; => &quot;value&quot;)</entry>
</row>
<row>
<entry>encodecookies</entry><entry>bool</entry><entry>whether to urlencode the cookies (default: true)</entry>
</row>
<row>
<entry>cookiestore</entry><entry>string</entry><entry>path to a file where cookies are/will be stored</entry>
</row>
<row>
<entry>cookiesession</entry><entry>bool</entry><entry>don't load session cookies from cookiestore if TRUE</entry>
</row>
<row>
<entry>resume</entry><entry>int</entry><entry>byte offset to start the download from; if the server supports ranges</entry>
</row>
<row>
<entry>range</entry><entry>array</entry><entry>array of arrays, each containing two integers, specifying the ranges to download if server support is given; only recognized if the resume option is empty</entry>
</row>
<row>
<entry>maxfilesize</entry><entry>int</entry><entry>maximum file size that should be downloaded; has no effect, if the size of the requested entity is</entry>
</row>
<row>
<entry>lastmodified</entry><entry>int</entry><entry>timestamp for If-(Un)Modified-Since header</entry>
</row>
<row>
<entry>etag</entry><entry>string</entry><entry>quoted etag for If-(None-)Match header</entry>
</row>
<row>
<entry>timeout</entry><entry>int</entry><entry>seconds the request may take</entry>
</row>
<row>
<entry>connecttimeout</entry><entry>int</entry><entry>seconds the connect may take</entry>
</row>
<row>
<entry>onprogress</entry><entry>mixed</entry><entry>progress callback</entry>
</row>
<row>
<entry>interface</entry><entry>string</entry><entry>outgoing network interface (ifname, ip or hostname)</entry>
</row>
<row>
<entry>portrange</entry><entry>array</entry><entry>2 integers specifying outgoing portrange to try</entry>
</row>
<row>
<entry>ssl</entry><entry>array</entry>
<entry>
<para>
<table id="http.request.options.ssl">
<title>with the following options:</title>
<tgroup cols="3">
<thead>
<row>
<entry>Name</entry>
<entry>Type</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>cert</entry><entry>string</entry><entry>path to certificate</entry>
</row>
<row>
<entry>certtype</entry><entry>string</entry><entry>type of certificate</entry>
</row>
<row>
<entry>certpasswd</entry><entry>string</entry><entry>password for certificate</entry>
</row>
<row>
<entry>key</entry><entry>string</entry><entry>path to key</entry>
</row>
<row>
<entry>keytype</entry><entry>string</entry><entry>type of key</entry>
</row>
<row>
<entry>keypasswd</entry><entry>string</entry><entry>pasword for key</entry>
</row>
<row>
<entry>engine</entry><entry>string</entry><entry>ssl engine to use</entry>
</row>
<row>
<entry>version</entry><entry>int</entry><entry>ssl version to use</entry>
</row>
<row>
<entry>verifypeer</entry><entry>bool</entry><entry>whether to verify the peer</entry>
</row>
<row>
<entry>verifyhost</entry><entry>bool whether to verify the host</entry>
</row>
<row>
<entry>cipher_list</entry><entry>string</entry><entry>list of allowed ciphers</entry>
</row>
<row>
<entry>cainfo</entry><entry>string</entry><entry></entry>
</row>
<row>
<entry>capath</entry><entry>string</entry><entry></entry>
</row>
<row>
<entry>random_file</entry><entry>string</entry><entry></entry>
</row>
<row>
<entry>egdsocket</entry><entry>string</entry><entry></entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>url</parameter></term>
<listitem>
<para>
URL
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>options</parameter></term>
<listitem>
<para>
<link linkend="http.request.options">HTTP request options</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>info</parameter></term>
<listitem id="http.request.info">
<para>
Will be filled with request/response information
</para>
<para>
<screen>
<![CDATA[array (
'effective_url' => 'http://www.example.com/',
'response_code' => 302,
'connect_code' => 0,
'filetime' => -1,
'total_time' => 0.212348,
'namelookup_time' => 0.038296,
'connect_time' => 0.104144,
'pretransfer_time' => 0.104307,
'starttransfer_time' => 0.212077,
'redirect_time' => 0,
'redirect_count' => 0,
'size_upload' => 0,
'size_download' => 218,
'speed_download' => 1026,
'speed_upload' => 0,
'header_size' => 307,
'request_size' => 103,
'ssl_verifyresult' => 0,
'ssl_engines' =>
array (
0 => 'dynamic',
1 => 'cswift',
2 => 'chil',
3 => 'atalla',
4 => 'nuron',
5 => 'ubsec',
6 => 'aep',
7 => 'sureware',
8 => '4758cca',
),
'content_length_download' => 218,
'content_length_upload' => 0,
'content_type' => 'text/html',
'httpauth_avail' => 0,
'proxyauth_avail' => 0,
'num_connects' => 1,
'os_errno' => 0,
'error' => '',
)
]]>
</screen>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&returns.http.response;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_get</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,161 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-head">
<refnamediv>
<refname>http_head</refname>
<refpurpose>Perform HEAD request</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_head</methodname>
<methodparam choice="opt"><type>string</type><parameter>url</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">info</parameter></methodparam>
</methodsynopsis>
<para>
Performs an HTTP HEAD request on the supplied url.
</para>
&see.http.request.options;
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>url</parameter></term>
<listitem>
<para>
URL
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>options</parameter></term>
<listitem>
<para>
&link.http.request.options;
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>info</parameter></term>
<listitem>
<para>
&link.http.request.info;
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&returns.http.response;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_head</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-post-data">
<refnamediv>
<refname>http_post_data</refname>
<refpurpose>Perform POST request with pre-encoded data</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_post_data</methodname>
<methodparam><type>string</type><parameter>url</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">info</parameter></methodparam>
</methodsynopsis>
<para>
Performs an HTTP POST request on the supplied url.
</para>
&see.http.request.options;
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>url</parameter></term>
<listitem>
<para>
URL
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
String containing the pre-encoded post data
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>options</parameter></term>
<listitem>
<para>
&link.http.request.options;
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>info</parameter></term>
<listitem>
<para>
&link.http.request.info;
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&returns.http.response;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_post_data</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,179 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-post-fields">
<refnamediv>
<refname>http_post_fields</refname>
<refpurpose>Perform POST request with data to be encoded</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_post_fields</methodname>
<methodparam><type>string</type><parameter>url</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>files</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">info</parameter></methodparam>
</methodsynopsis>
<para>
Performs an HTTP POST request on the supplied url.
</para>
&see.http.request.options;
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>url</parameter></term>
<listitem>
<para>
URL
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
Associative array of POST values
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>files</parameter></term>
<listitem>
<para>
Array of files to post
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>options</parameter></term>
<listitem>
<para>
&link.http.request.options;
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>info</parameter></term>
<listitem>
<para>
&link.http.request.info;
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&returns.http.response;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_post_fields</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-put-data">
<refnamediv>
<refname>http_put_data</refname>
<refpurpose>Perform PUT request with data</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_put_data</methodname>
<methodparam><type>string</type><parameter>url</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">info</parameter></methodparam>
</methodsynopsis>
<para>
Performs an HTTP PUT request on the supplied url.
</para>
&see.http.request.options;
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>url</parameter></term>
<listitem>
<para>
URL
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
PUT request body
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>options</parameter></term>
<listitem>
<para>
&link.http.request.options;
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>info</parameter></term>
<listitem>
<para>
&link.http.request.info;
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&returns.http.response;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_put_data</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-put-file">
<refnamediv>
<refname>http_put_file</refname>
<refpurpose>Perform PUT request with file</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_put_file</methodname>
<methodparam><type>string</type><parameter>url</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>file</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">info</parameter></methodparam>
</methodsynopsis>
<para>
Performs an HTTP PUT request on the supplied url.
</para>
&see.http.request.options;
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>url</parameter></term>
<listitem>
<para>
URL
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>file</parameter></term>
<listitem>
<para>
The file to put
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>options</parameter></term>
<listitem>
<para>
&link.http.request.options;
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>info</parameter></term>
<listitem>
<para>
&link.http.request.info;
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&returns.http.response;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_put_file</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-put-stream">
<refnamediv>
<refname>http_put_stream</refname>
<refpurpose>Perform PUT request with stream</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_put_stream</methodname>
<methodparam><type>string</type><parameter>url</parameter></methodparam>
<methodparam choice="opt"><type>resource</type><parameter>stream</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">info</parameter></methodparam>
</methodsynopsis>
<para>
Performs an HTTP PUT request on the supplied url.
</para>
&see.http.request.options;
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>url</parameter></term>
<listitem>
<para>
URL
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>stream</parameter></term>
<listitem>
<para>
The stream to read the PUT request body from
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>options</parameter></term>
<listitem>
<para>
&link.http.request.options;
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>info</parameter></term>
<listitem>
<para>
&link.http.request.info;
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&returns.http.response;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_put_stream</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-request-body-encode">
<refnamediv>
<refname>http_request_body_encode</refname>
<refpurpose>Encode request body</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_request_body_encode</methodname>
<methodparam><type>array</type><parameter>fields</parameter></methodparam>
<methodparam><type>array</type><parameter>files</parameter></methodparam>
</methodsynopsis>
<para>
Generate x-www-form-urlencoded resp. form-data encoded request body.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>fields</parameter></term>
<listitem>
<para>
POST fields
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>files</parameter></term>
<listitem>
<para>
POST files
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns encoded string on success, or FALSE on failure
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_request_body_encode</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-request-method-exists">
<refnamediv>
<refname>http_request_method_exists</refname>
<refpurpose>Check whether request method exists</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>http_request_method_exists</methodname>
<methodparam><type>mixed</type><parameter>method</parameter></methodparam>
</methodsynopsis>
<para>
Check if a request method is registered (or available by default).
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>method</parameter></term>
<listitem>
<para>
request method name or ID
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &true; if the request method is known, else &false;.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_request_method_exists</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-request-method-name">
<refnamediv>
<refname>http_request_method_name</refname>
<refpurpose>Get request method name</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_request_method_name</methodname>
<methodparam><type>int</type><parameter>method</parameter></methodparam>
</methodsynopsis>
<para>
Get the literal string representation of a standard or registered request method.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>method</parameter></term>
<listitem>
<para>
request method ID
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the request method name as string on success, or &false; on failure.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_request_method_name</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-request-method-register">
<refnamediv>
<refname>http_request_method_register</refname>
<refpurpose>Register request method</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>http_request_method_register</methodname>
<methodparam><type>string</type><parameter>method</parameter></methodparam>
</methodsynopsis>
<para>
Register a custom request method.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>method</parameter></term>
<listitem>
<para>
the request method name to register
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the ID of the request method on success, or FALSE on failure.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_request_method_register</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-request-method-unregister">
<refnamediv>
<refname>http_request_method_unregister</refname>
<refpurpose>Unregister request method</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>http_request_method_unregister</methodname>
<methodparam><type>mixed</type><parameter>method</parameter></methodparam>
</methodsynopsis>
<para>
Unregister a previously registered custom request method.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>method</parameter></term>
<listitem>
<para>
he request method name or ID
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_request_method_unregister</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-request">
<refnamediv>
<refname>http_request</refname>
<refpurpose>Perform custom request</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_request</methodname>
<methodparam><type>int</type><parameter>method</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>url</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>body</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">info</parameter></methodparam>
</methodsynopsis>
<para>
Performs a custom HTTP request on the supplied url.
</para>
&see.http.request.options;
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>method</parameter></term>
<listitem>
<para>
Request method
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>url</parameter></term>
<listitem>
<para>
URL
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>body</parameter></term>
<listitem>
<para>
Request body
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>options</parameter></term>
<listitem>
<para>
&link.http.request.options;
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>info</parameter></term>
<listitem>
<para>
&link.http.request.info;
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&returns.http.response;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_request</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,206 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-redirect">
<refnamediv>
<refname>http_redirect</refname>
<refpurpose>Issue HTTP redirect</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>http_redirect</methodname>
<methodparam choice="opt"><type>string</type><parameter>url</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>params</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>session = FALSE</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>status</parameter></methodparam>
</methodsynopsis>
<para>
Redirect to the given url.
</para>
<para>
The supplied url will be expanded with <function>http_build_url</function>, the params array will
be treated with <function>http_build_str</function> and the session identification will be appended
if session is true.
</para>
<para>
The HTTP response code will be set according to status.
</para>
<para>
You can use one of the <link linkend="http.constants.redirect">redirect constants</link> for convenience.
</para>
<para>
Please see <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3">RFC 2616</ulink>
for which redirect response code to use in which situation.
</para>
<para>
By default PHP will decide which response status fits best.
</para>
<para>
To be RFC compliant, &quot;Redirecting to &lt;a&gt;URL&lt;/a&gt;.&quot; will be displayed,
if the client doesn't redirect immediately, and the request method was
another one than HEAD.
</para>
<para>
A log entry will be written to the redirect log, if the &link.http.configuration;
<emphasis>http.log.redirect</emphasis> is set and the redirect attempt was successful.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>url</parameter></term>
<listitem>
<para>
the URL to redirect to
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>params</parameter></term>
<listitem>
<para>
associative array of query parameters
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>session</parameter></term>
<listitem>
<para>
whether to append session information
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>false</parameter></term>
<listitem>
<para>
Its description
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>status</parameter></term>
<listitem>
<para>
custom response status code
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &false; on failure, or <emphasis>exits</emphasis> on success.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_redirect</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,156 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-send-content-disposition">
<refnamediv>
<refname>http_send_content_disposition</refname>
<refpurpose>Send Content-Disposition</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>http_send_content_disposition</methodname>
<methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>inline = FALSE</parameter></methodparam>
</methodsynopsis>
<para>
Send the Content-Disposition. The Content-Disposition header is very useful
if the data actually sent came from a file or something similar, that should
be &quot;saved&quot; by the client/user (i.e. by browsers &quot;Save as...&quot; popup window).
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
the file name the &quot;Save as...&quot; dialog should display
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>inline</parameter></term>
<listitem>
<para>
if set to true and the user agent knows how to handle the content type,
it will probably not cause the popup window to be shown
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_send_content_disposition</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-send-content-type">
<refnamediv>
<refname>http_send_content_type</refname>
<refpurpose>Send Content-Type</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>http_send_content_type</methodname>
<methodparam choice="opt"><type>string</type><parameter>content_type = 'application/x-octetstream'</parameter></methodparam>
</methodsynopsis>
<para>
Send the Content-Type of the sent entity. This is particularly important
if you use the <function>http_send</function> API.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>content_type</parameter></term>
<listitem>
<para>
the desired content type (primary/secondary)
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_send_content_type</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-send-data">
<refnamediv>
<refname>http_send_data</refname>
<refpurpose>Send arbitrary data</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>http_send_data</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<para>
Sends raw data with support for (multiple) range requests.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
data to send
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_send_data</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-send-file">
<refnamediv>
<refname>http_send_file</refname>
<refpurpose>Send file</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>http_send_file</methodname>
<methodparam><type>string</type><parameter>file</parameter></methodparam>
</methodsynopsis>
<para>
Sends a file with support for (multiple) range requests.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>file</parameter></term>
<listitem>
<para>
the file to send
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_send_file</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-send-last-modified">
<refnamediv>
<refname>http_send_last_modified</refname>
<refpurpose>Send Last-Modified</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>http_send_last_modified</methodname>
<methodparam choice="opt"><type>int</type><parameter>timestamp</parameter></methodparam>
</methodsynopsis>
<para>
Send a <emphasis>Last-Modified</emphasis> header with a valid HTTP date.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>timestamp</parameter></term>
<listitem>
<para>
a unix timestamp, converted it to a valid HTTP date;
if omitted, the current time will be sent
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_send_last_modified</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-send-status">
<refnamediv>
<refname>http_send_status</refname>
<refpurpose>Send status</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>http_send_status</methodname>
<methodparam><type>int</type><parameter>status</parameter></methodparam>
</methodsynopsis>
<para>
Send HTTP status code.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>status</parameter></term>
<listitem>
<para>
HTTP status code
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_send_status</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-send-stream">
<refnamediv>
<refname>http_send_stream</refname>
<refpurpose>Send stream</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>http_send_stream</methodname>
<methodparam><type>resource</type><parameter>stream</parameter></methodparam>
</methodsynopsis>
<para>
Sends an already opened stream with support for (multiple) range requests.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>stream</parameter></term>
<listitem>
<para>
stream to read from (must be seekable)
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_send_stream</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-throttle">
<refnamediv>
<refname>http_throttle</refname>
<refpurpose>HTTP throttling</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>http_throttle</methodname>
<methodparam choice="opt"><type>double</type><parameter>sec</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>bytes = 40960</parameter></methodparam>
</methodsynopsis>
<para>
Sets the throttle delay and send buffer size for use with http_send() API.
Provides a basic throttling mechanism, which will yield the current process
resp. thread until the entity has been completely sent, though.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>sec</parameter></term>
<listitem>
<para>
seconds too sleep after each chunk sent
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>bytes</parameter></term>
<listitem>
<para>
the chunk size in bytes
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_throttle</function> example</title>
<para>
Send file with approximately 20 kbyte/s.
</para>
<programlisting role="php">
<![CDATA[
<?php
// ~ 20 kbyte/s
# http_throttle(1, 20000);
# http_throttle(0.5, 10000);
# http_throttle(0.1, 2000);
http_send_file('document.pdf');
?>
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -1,371 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.37 $ -->
<!-- splitted from ./en/functions/http.xml, last change in rev 1.2 -->
<refentry id="function.setcookie">
<refnamediv>
<refname>setcookie</refname>
<refpurpose>Send a cookie</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>setcookie</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expire</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>path</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>domain</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>secure</parameter></methodparam>
</methodsynopsis>
<para>
<function>setcookie</function> defines a cookie to be sent along
with the rest of the HTTP headers. Like other headers, cookies
must be sent <emphasis>before</emphasis> any output from your
script (this is a protocol restriction). This requires that you
place calls to this function prior to any output, including
<literal>&lt;html&gt;</literal> and <literal>&lt;head&gt;</literal> tags
as well as any whitespace. If output exists prior to calling this
function, <function>setcookie</function> will fail and return &false;.
If <function>setcookie</function> successfully runs, it will return
&true;. This does not indicate whether the user accepted the cookie.
</para>
<note>
<para>
As of PHP 4, you can use output buffering to send output prior to the
call of this function, with the overhead of all of your output to the
browser being buffered in the server until you send it. You can do this
by calling <function>ob_start</function> and
<function>ob_end_flush</function> in your script, or setting the
<literal>output_buffering</literal> configuration directive on in your
&php.ini; or server configuration files.
</para>
</note>
<para>
All the arguments except the <parameter>name</parameter> argument
are optional. You may also replace an argument with an empty string
(<emphasis>&quot;&quot;</emphasis>) in order to skip that
argument. Because the <parameter>expire</parameter>
argument is integer, it cannot
be skipped with an empty string, use a zero (<emphasis>0</emphasis>)
instead. The following table explains each parameter of the
<function>setcookie</function> function, be sure to read the
<ulink url="&spec.cookies;">Netscape cookie specification</ulink> for
specifics on how each <function>setcookie</function> parameter works
and <ulink url="&url.rfc;2965">RFC 2965</ulink> for additional
information on how HTTP cookies work.
</para>
<para>
<table>
<title><function>setcookie</function> parameters explained</title>
<tgroup cols="3">
<thead>
<row>
<entry>Parameter</entry>
<entry>Description</entry>
<entry>Examples</entry>
</row>
</thead>
<tbody>
<row>
<entry><parameter>name</parameter></entry>
<entry>
The name of the cookie.
</entry>
<entry>
'cookiename' is called as <varname>$_COOKIE['cookiename']</varname>
</entry>
</row>
<row>
<entry><parameter>value</parameter></entry>
<entry>
The value of the cookie. This value is stored on the clients
computer; do not store sensitive information.
</entry>
<entry>
Assuming the <parameter>name</parameter> is 'cookiename', this
value is retrieved through <varname>$_COOKIE['cookiename']</varname>
</entry>
</row>
<row>
<entry><parameter>expire</parameter></entry>
<entry>
The time the cookie expires. This is a Unix timestamp so is
in number of seconds since the epoch. In other words, you'll
most likely set this with the <function>time</function> function
plus the number of seconds before you want it to expire. Or
you might use <function>mktime</function>.
</entry>
<entry>
<literal>time()+60*60*24*30</literal> will set the cookie to
expire in 30 days. If not set, the cookie will expire at
the end of the session (when the browser closes).
</entry>
</row>
<row>
<entry><parameter>path</parameter></entry>
<entry>
The path on the server in which the cookie will be available on.
</entry>
<entry>
If set to <literal>'/'</literal>, the cookie will be available
within the entire <parameter>domain</parameter>. If set to
<literal>'/foo/'</literal>, the cookie will only be available
within the <literal>/foo/</literal> directory and all
sub-directories such as <literal>/foo/bar/</literal> of
<parameter>domain</parameter>. The default value is the
current directory that the cookie is being set in.
</entry>
</row>
<row>
<entry><parameter>domain</parameter></entry>
<entry>
The domain that the cookie is available.
</entry>
<entry>
To make the cookie available on all subdomains of example.com
then you'd set it to <literal>'.example.com'</literal>. The
<literal>.</literal> is not required but makes it compatible
with more browsers. Setting it to <literal>www.example.com</literal>
will make the cookie only available in the <literal>www</literal>
subdomain. Refer to tail matching in the
<ulink url="&spec.cookies;">spec</ulink> for details.
</entry>
</row>
<row>
<entry><parameter>secure</parameter></entry>
<entry>
Indicates that the cookie should only be transmitted over a
secure HTTPS connection. When set to &true;, the
cookie will only be set if a secure connection exists. The default
is &false;.
</entry>
<entry>
<literal>0</literal> or <literal>1</literal>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<para>
Once the cookies have been set, they can be accessed on the next page load
with the <link linkend="reserved.variables.cookies">$_COOKIE</link> or
<varname>$HTTP_COOKIE_VARS</varname> arrays. Note,
<link linkend="language.variables.superglobals">autoglobals</link>
such as <varname>$_COOKIE</varname> became available in PHP
<ulink url="&url.php.release4.1.0;">4.1.0</ulink>.
<varname>$HTTP_COOKIE_VARS</varname> has existed since PHP 3. Cookie
values also exist in <link linkend="reserved.variables.request">
$_REQUEST</link>.
</para>
<note>
<para>
If the PHP directive <link linkend="ini.register-globals">register_globals</link>
is set to <literal>on</literal> then cookie values will also be made into
variables. In our examples below, <varname>$TestCookie</varname> will
exist. It's recommended to use <varname>$_COOKIE</varname>.
</para>
</note>
<para>
Common Pitfalls:
<itemizedlist>
<listitem>
<simpara>
Cookies will not become visible until the next loading of a page that
the cookie should be visible for. To test if a cookie was successfully
set, check for the cookie on a next loading page before the cookie
expires. Expire time is set via the <parameter>expire</parameter>
parameter. A nice way to debug the existence of cookies is by
simply calling <literal>print_r($_COOKIE);</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
Cookies must be deleted with the same parameters as they were set with.
If the value argument is an empty string, or &false;, and all other arguments
match a previous call to setcookie, then the cookie with the specified
name will be deleted from the remote client.
</simpara>
</listitem>
<listitem>
<simpara>
Because setting a cookie with a value of &false; will try to delete the cookie,
you should not use boolean values. Instead, use <emphasis>0</emphasis> for &false;
and <emphasis>1</emphasis> for &true;.
</simpara>
</listitem>
<listitem>
<simpara>
Cookies names can be set as array names and will be available to your
PHP scripts as arrays but separate cookies are stored on the users
system. Consider <function>explode</function> to set one cookie with
multiple names and values. It is not recommended to use
<function>serialize</function> for this purpose, because it can result
in security holes.
</simpara>
</listitem>
</itemizedlist>
</para>
<simpara>
In PHP 3, multiple calls to <function>setcookie</function> in the same
script will be performed in reverse order. If you are trying to
delete one cookie before inserting another you should put the
insert before the delete. As of PHP 4, multiple calls to
<function>setcookie</function> are performed in the order called.
</simpara>
<para>
Some examples follow how to send cookies:
<example>
<title><function>setcookie</function> send example</title>
<programlisting role="php">
<![CDATA[
<?php
$value = 'something from somewhere';
setcookie("TestCookie", $value);
setcookie("TestCookie", $value, time()+3600); /* expire in 1 hour */
setcookie("TestCookie", $value, time()+3600, "/~rasmus/", ".example.com", 1);
?>
]]>
</programlisting>
</example>
</para>
<para>
Note that the value portion of the cookie will automatically be
urlencoded when you send the cookie, and when it is received, it
is automatically decoded and assigned to a variable by the same
name as the cookie name. If you don't want this, you can use
<function>setrawcookie</function> instead if you are using PHP 5. To see
the contents of our test cookie in a script, simply use one of the
following examples:
</para>
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
// Print an individual cookie
echo $_COOKIE["TestCookie"];
echo $HTTP_COOKIE_VARS["TestCookie"];
// Another way to debug/test is to view all cookies
print_r($_COOKIE);
?>
]]>
</programlisting>
</informalexample>
</para>
<para>
When deleting a cookie you should assure that the expiration date
is in the past, to trigger the removal mechanism in your browser.
Examples follow how to delete cookies sent in previous example:
</para>
<para>
<example>
<title><function>setcookie</function> delete example</title>
<programlisting role="php">
<![CDATA[
<?php
// set the expiration date to one hour ago
setcookie ("TestCookie", "", time() - 3600);
setcookie ("TestCookie", "", time() - 3600, "/~rasmus/", ".example.com", 1);
?>
]]>
</programlisting>
</example>
</para>
<para>
You may also set array cookies by using array notation in the
cookie name. This has the effect of setting as many cookies as
you have array elements, but when the cookie is received by your
script, the values are all placed in an array with the cookie's
name:
</para>
<para>
<example>
<title><function>setcookie</function> and arrays</title>
<programlisting role="php">
<![CDATA[
<?php
// set the cookies
setcookie("cookie[three]", "cookiethree");
setcookie("cookie[two]", "cookietwo");
setcookie("cookie[one]", "cookieone");
// after the page reloads, print them out
if (isset($_COOKIE['cookie'])) {
foreach ($_COOKIE['cookie'] as $name => $value) {
echo "$name : $value <br />\n";
}
}
?>
]]>
</programlisting>
<para>
which prints
</para>
<screen>
<![CDATA[
three : cookiethree
two : cookietwo
one : cookieone
]]>
</screen>
</example>
</para>
<note>
<para>
The following RFC's may also be useful:
<ulink url="&url.rfc;2109">RFC 2109</ulink> and
<ulink url="&url.rfc;2965">RFC 2695</ulink>
</para>
<para>
You may notice the <parameter>expire</parameter> parameter takes on a
Unix timestamp, as opposed to the date format <literal>Wdy, DD-Mon-YYYY
HH:MM:SS GMT</literal>, this is because PHP does this conversion
internally.
</para>
<para>
<parameter>expire</parameter> is compared to the client's time which can
differ from server's time.
</para>
</note>
<note>
<simpara>
Microsoft Internet Explorer 4 with Service Pack 1 applied does
not correctly deal with cookies that have their path parameter
set.
</simpara>
<simpara>
Netscape Communicator 4.05 and Microsoft Internet Explorer 3.x
appear to handle cookies incorrectly when the path and time
are not set.
</simpara>
</note>
<para>
See also <function>header</function>, <function>setrawcookie</function>
and the <link linkend="features.cookies">cookies section</link>.
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/http.xml, last change in rev 1.2 -->
<refentry id="function.setrawcookie">
<refnamediv>
<refname>setrawcookie</refname>
<refpurpose>Send a cookie without urlencoding the cookie value</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>setrawcookie</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expire</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>path</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>domain</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>secure</parameter></methodparam>
</methodsynopsis>
<para>
<function>setrawcookie</function> is exactly the same as
<function>setcookie</function> except that the cookie value will not
be automatically urlencoded when sent to the browser.
</para>
<para>
See also <function>header</function>, <function>setcookie</function> and the
<link linkend="features.cookies">cookies section</link>.
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-build-str">
<refnamediv>
<refname>http_build_str</refname>
<refpurpose>Build query string</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_build_str</methodname>
<methodparam><type>array</type><parameter>query</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>prefix</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>arg_separator</parameter></methodparam>
</methodsynopsis>
<para>
Opponent to parse_str().
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>query</parameter></term>
<listitem>
<para>
associative array of query string parameters
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>prefix</parameter></term>
<listitem>
<para>
top level prefix
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>arg_separator</parameter></term>
<listitem>
<para>
argument separator to use (by default the INI setting arg_separator.output will be used, or &quot;&amp;&quot; if neither is set
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the built query as string on success or &false; on failure.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_build_str</function> example</title>
<para>
Any text that describes the purpose of the example, or
what goes on in the example should go here (inside the
<example> tag, not out
</para>
<programlisting role="php">
<![CDATA[
<?php
if ($anexample === true) {
echo 'Use the PEAR Coding Standards';
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->

View file

@ -0,0 +1,174 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-build-url">
<refnamediv>
<refname>http_build_url</refname>
<refpurpose>Build an URL</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_build_url</methodname>
<methodparam choice="opt"><type>mixed</type><parameter>url</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>parts</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags = HTTP_URL_REPLACE</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">new_url</parameter></methodparam>
</methodsynopsis>
<para>
Build an URL.
</para>
<para>
The parts of the second URL will be merged into the first according to the flags argument.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>url</parameter></term>
<listitem>
<para>
(part(s) of) an URL in form of a string or associative array like <function>parse_url</function> returns
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>parts</parameter></term>
<listitem>
<para>
same as the first argument
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem>
<para>
a bitmask of binary or'ed <link linkend="http.constants.url">HTTP_URL constants</link>;
<constant>HTTP_URL_REPLACE</constant> is the default
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>new_url</parameter></term>
<listitem>
<para>
if set, it will be filled with the parts of the composed url like <function>parse_url</function> would return
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the new URL as string on success or &false; on failure.
</para>
</refsect1>
<!-- Use when EXCEPTIONS exist
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>
When does this function throw exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_build_url</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
echo http_build_url("http://user@www.example.com/pub/index.php?a=b#files",
array(
"scheme" => "ftp",
"host" => "ftp.example.com",
"path" => "files/current/",
"query" => "a=c"
),
HTTP_URL_STRIP_AUTH | HTTP_URL_JOIN_PATH | HTTP_URL_JOIN_QUERY | HTTP_URL_STRIP_FRAGMENT
);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
ftp://ftp.example.com/pub/files/current/?a=b&a=c
]]>
</screen>
</example>
</para>
</refsect1>
<!-- Use when adding See Also links
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function></function></member>
<member>Or <link linkend="somethingelse">something else</link></member>
</simplelist>
</para>
</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
indent-tabs-mode:nil
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
-->