2007-12-22 16:56:27 +00:00
<?xml version="1.0" encoding="utf-8"?>
2009-07-11 07:21:14 +00:00
<!-- $Revision$ -->
2007-12-22 16:56:27 +00:00
<appendix xml:id= "http.request.options" xmlns= "http://docbook.org/ns/docbook" >
<title > Options usable with the HttpRequest class and request functions</title>
<titleabbrev > Request Options</titleabbrev>
2007-06-20 22:25:43 +00:00
<variablelist xml:id= "http.request.options.timeouts" >
2007-03-27 10:13:19 +00:00
<title > Options related to time outs</title>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "http.request.option.timeout" >
2007-03-27 10:13:19 +00:00
<term >
timeout (<type > integer</type> )
</term>
<listitem >
<simpara >
seconds the whole request may take to complete
</simpara>
</listitem>
</varlistentry>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "http.request.option.connecttimeout" >
2007-03-27 10:13:19 +00:00
<term >
connecttimeout (<type > integer</type> )
</term>
<listitem >
<simpara >
seconds the connect, including name resolving, may take
</simpara>
</listitem>
</varlistentry>
2009-02-03 22:14:06 +00:00
<varlistentry xml:id= "http.request.option.dns-cache-timeout" >
2007-03-27 10:13:19 +00:00
<term >
dns_cache_timeout (<type > integer</type> )
</term>
<listitem >
<simpara >
seconds after an dns cache entry times out
</simpara>
</listitem>
</varlistentry>
</variablelist>
2007-06-20 22:25:43 +00:00
<variablelist xml:id= "http.request.options.urls" >
2007-03-27 10:13:19 +00:00
<title > Options related to urls</title>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "http.request.option.url" >
2007-03-27 10:13:19 +00:00
<term >
url (<type > string</type> )
</term>
<listitem >
<simpara >
the request url
</simpara>
</listitem>
</varlistentry>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "http.request.option.port" >
2007-03-27 10:13:19 +00:00
<term >
port (<type > integer</type> )
</term>
<listitem >
<simpara >
use another port as specified in the url
</simpara>
</listitem>
</varlistentry>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "http.request.option.redirect" >
2007-03-27 10:13:19 +00:00
<term >
redirect (<type > integer</type> )
</term>
<listitem >
<simpara >
whether and how many redirects to follow; defaults to 0
</simpara>
</listitem>
</varlistentry>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "http.request.option.unrestrictedauth" >
2007-03-27 10:13:19 +00:00
<term >
unrestrictedauth (<type > bool</type> )
</term>
<listitem >
<simpara >
whether to continue sending credentials on redirects to a different host
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
referer (<type > string</type> )
</term>
<listitem >
<simpara >
2008-12-16 03:10:28 +00:00
the referring url to send
2007-03-27 10:13:19 +00:00
</simpara>
</listitem>
</varlistentry>
</variablelist>
2007-06-20 22:25:43 +00:00
<variablelist xml:id= "http.request.options.cookies" >
2007-03-27 10:13:19 +00:00
<title > Options related to cookies</title>
<varlistentry >
<term >
encodecookies (<type > bool</type> )
</term>
<listitem >
<simpara >
whether custom cookies should be <function > urlencode</function> d prior sending
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
cookies (<type > array</type> )
</term>
<listitem >
<simpara >
2012-01-11 02:15:08 +00:00
list of cookies as associative array like <literal > array("cookie" => "value")</literal>
2007-03-27 10:13:19 +00:00
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
cookiestore (<type > string</type> )
</term>
<listitem >
<simpara >
path to a file where cookies are/will be stored
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
cookiesession (<type > bool</type> )
</term>
<listitem >
<simpara >
don't load session cookies from cookiestore if &true;
</simpara>
</listitem>
</varlistentry>
</variablelist>
2007-06-20 22:25:43 +00:00
<variablelist xml:id= "http.request.options.headers" >
2007-03-27 10:13:19 +00:00
<title > Options related to headers</title>
<varlistentry >
<term >
useragent (<type > string</type> )
</term>
<listitem >
<simpara >
the user agent to send; defaults to <literal > PECL::HTTP/x.y.z (PHP/x.y.z)</literal> ; omitted if explicitly set to an empty string
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
lastmodified (<type > int</type> )
</term>
<listitem >
<simpara >
timestamp for If-(Un)Modified-Since header
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
etag (<type > string</type> )
</term>
<listitem >
<simpara >
quoted etag for If-(None-)Match header
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
headers (<type > array</type> )
</term>
<listitem >
<simpara >
2012-01-11 02:15:08 +00:00
list of custom headers as associative array like <literal > array("header" => "value")</literal>
2007-03-27 10:13:19 +00:00
</simpara>
</listitem>
</varlistentry>
</variablelist>
2007-06-20 22:25:43 +00:00
<variablelist xml:id= "http.request.options.auth" >
2007-03-27 10:13:19 +00:00
<title > Options related to authentication</title>
<varlistentry >
<term >
httpauth (<type > string</type> )
</term>
<listitem >
<simpara >
2012-01-11 02:15:08 +00:00
http credentials in "user:pass" format
2007-03-27 10:13:19 +00:00
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
httpauthtype (<type > int</type> )
</term>
<listitem >
<simpara >
<link linkend= "http.constants.request.httpauth" > HTTP authentication type constant</link>
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
(<type > array</type> )
</term>
<listitem >
<simpara >
</simpara>
</listitem>
</varlistentry>
</variablelist>
2007-06-20 22:25:43 +00:00
<variablelist xml:id= "http.request.options.proxy" >
2007-03-27 10:13:19 +00:00
<title > Options related to proxies</title>
<varlistentry >
<term >
proxyhost (<type > string</type> )
</term>
<listitem >
<simpara >
2012-01-11 02:15:08 +00:00
proxy host in "host[:port]" format
2007-03-27 10:13:19 +00:00
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
proxyport (<type > int</type> )
</term>
<listitem >
<simpara >
use another proxy port as specified in proxyhost
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
proxytype (<type > int</type> )
</term>
<listitem >
<simpara >
<link linkend= "http.constants.request.proxy" > HTTP proxy type constant</link>
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
proxyauth (<type > string</type> )
</term>
<listitem >
<simpara >
2012-01-11 02:15:08 +00:00
proxy credentials in "user:pass" format
2007-03-27 10:13:19 +00:00
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
proxyauthtype (<type > int</type> )
</term>
<listitem >
<simpara >
<link linkend= "http.constants.request.httpauth" > HTTP authentication type constant</link>
</simpara>
</listitem>
</varlistentry>
</variablelist>
2007-06-20 22:25:43 +00:00
<variablelist xml:id= "http.request.options.transfer" >
2007-03-27 10:13:19 +00:00
<title > Options related to the transfer</title>
<varlistentry >
<term >
compress (<type > bool</type> )
</term>
<listitem >
<simpara >
whether to request and accept a gzip/deflate content encoded response
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
resume (<type > int</type> )
</term>
<listitem >
<simpara >
start the download at the specified byte offset if server support is given (indicated by a 206 response code)
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
range (<type > array</type> )
</term>
<listitem >
<simpara >
array of arrays, each containing two <type > integer</type> s, specifying the ranges to download if server support is given (indicated by a 206 response code);
only recognized if the resume option is empty
</simpara>
</listitem>
</varlistentry>
</variablelist>
2007-06-20 22:25:43 +00:00
<variablelist xml:id= "http.request.options.limits" >
2007-03-27 10:13:19 +00:00
<title > Options imposing limits</title>
<varlistentry >
<term >
maxfilesize (<type > integer</type> )
</term>
<listitem >
<simpara >
maximum file size that should be downloaded;
has no effect, if the size of the requested entity is unknown
(eg. dynamic pages with chunked transfer encoding etc.)
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
low_speed_limit (<type > int</type> )
</term>
<listitem >
<simpara >
the lowest transfer speed a successful request may have
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
low_speed_time (<type > int</type> )
</term>
<listitem >
<simpara >
the time in which <literal > low_speed_limit</literal> must be transferred for a successful request
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
max_send_speed (<type > int</type> )
</term>
<listitem >
<simpara >
maximum send speed in bytes per second
</simpara>
</listitem>
</varlistentry>
<varlistentry >
<term >
max_recv_speed (<type > int</type> )
</term>
<listitem >
<simpara >
maximum receive speed in bytes per second
</simpara>
</listitem>
</varlistentry>
</variablelist>
2007-06-20 22:25:43 +00:00
<variablelist xml:id= "http.request.options.callback" >
2007-03-27 10:13:19 +00:00
<title > Callback options</title>
<varlistentry >
2012-03-12 05:55:59 +00:00
<term > onprogress (<type > callable</type> )</term>
2007-03-27 10:13:19 +00:00
<listitem > <simpara > progress callback</simpara> </listitem>
</varlistentry>
</variablelist>
2007-06-20 22:25:43 +00:00
<variablelist xml:id= "http.request.options.network" >
2007-03-27 10:13:19 +00:00
<title > Network options</title>
<varlistentry >
<term > interface (<type > string</type> )</term>
<listitem > <simpara > outgoing network interface (ifname, ip or hostname)</simpara> </listitem>
</varlistentry>
<varlistentry >
<term > portrange (<type > array</type> )</term>
<listitem > <simpara > 2 integers specifying outgoing portrange to try</simpara> </listitem>
</varlistentry>
</variablelist>
2007-06-20 22:25:43 +00:00
<variablelist xml:id= "http.request.options.ssl" >
2007-03-27 10:13:19 +00:00
<title > SSL options</title>
<varlistentry >
<term >
ssl (<type > array</type> )
</term>
<listitem >
2007-03-27 10:32:26 +00:00
<note >
2012-01-11 02:15:08 +00:00
<simpara > SSL options are set through an array with the single "ssl" request option name.</simpara>
2007-03-27 10:32:26 +00:00
</note>
2007-03-27 10:13:19 +00:00
<variablelist >
<varlistentry >
<term > cert (<type > string</type> )</term>
<listitem > <simpara > path to certificate</simpara> </listitem>
</varlistentry>
<varlistentry >
<term > certtype (<type > string</type> )</term>
<listitem > <simpara > type of certificate</simpara> </listitem>
</varlistentry>
<varlistentry >
<term > certpasswd (<type > string</type> )</term>
<listitem > <simpara > password for certificate</simpara> </listitem>
</varlistentry>
<varlistentry >
<term > key (<type > string</type> )</term>
<listitem > <simpara > path to key</simpara> </listitem>
</varlistentry>
<varlistentry >
<term > keytype (<type > string</type> )</term>
<listitem > <simpara > type of key</simpara> </listitem>
</varlistentry>
<varlistentry >
<term > keypasswd (<type > string</type> )</term>
2008-12-16 03:10:28 +00:00
<listitem > <simpara > password for key</simpara> </listitem>
2007-03-27 10:13:19 +00:00
</varlistentry>
<varlistentry >
<term > engine (<type > string</type> )</term>
<listitem > <simpara > ssl engine to use</simpara> </listitem>
</varlistentry>
<varlistentry >
<term > version (<type > int</type> )</term>
<listitem > <simpara > ssl version to use</simpara> </listitem>
</varlistentry>
<varlistentry >
<term > verifypeer (<type > bool</type> )</term>
<listitem > <simpara > whether to verify the peer</simpara> </listitem>
</varlistentry>
<varlistentry >
<term > verifyhost (<type > bool</type> )</term>
<listitem > <simpara > whether to verify the host</simpara> </listitem>
</varlistentry>
<varlistentry >
<term > cipher_list (<type > string</type> )</term>
<listitem > <simpara > list of allowed ciphers</simpara> </listitem>
</varlistentry>
<varlistentry >
<term > cainfo (<type > string</type> )</term>
<listitem > <simpara > </simpara> </listitem>
</varlistentry>
<varlistentry >
<term > capath (<type > string</type> )</term>
<listitem > <simpara > </simpara> </listitem>
</varlistentry>
<varlistentry >
<term > random_file (<type > string</type> )</term>
<listitem > <simpara > </simpara> </listitem>
</varlistentry>
<varlistentry >
<term > egdsocket (<type > string</type> )</term>
<listitem > <simpara > </simpara> </listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
2007-12-22 16:56:27 +00:00
</appendix>
2007-03-27 10:13:19 +00:00
<!-- 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
2009-09-25 07:04:39 +00:00
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
2007-03-27 10:13:19 +00:00
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
-->