- minor updates

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@232712 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Michael Wallner 2007-03-27 10:13:49 +00:00
parent c7d283fd46
commit 0018590775
5 changed files with 128 additions and 258 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="http.HttpRequest">
<refnamediv>
@ -31,86 +31,97 @@
<entry>protected</entry>
<entry>array</entry>
<entry>options</entry>
<entry>request options to configure the request; see &link.http.request.options;</entry>
</row>
<row>
<entry>protected</entry>
<entry>array</entry>
<entry>postFields</entry>
<entry>form data: <literal><![CDATA[array("fieldname" => "fieldvalue")]]></literal></entry>
</row>
<row>
<entry>protected</entry>
<entry>array</entry>
<entry>postFiles</entry>
<entry>files to upload: <literal><![CDATA[array(array("name" => "image", "file" => "/home/u/images/u.png", "type" => "image/png"))]]></literal></entry>
</row>
<row>
<entry>protected</entry>
<entry>array</entry>
<entry>responseInfo</entry>
</row>
<row>
<entry>protected</entry>
<entry>array</entry>
<entry>responseData</entry>
<entry>information (statistical) about the request/response; see &link.http.request.info;</entry>
</row>
<row>
<entry>protected</entry>
<entry>HttpMessage</entry>
<entry>responseMessage</entry>
<entry>the response message</entry>
</row>
<row>
<entry>protected</entry>
<entry>integer</entry>
<entry>responseCode</entry>
<entry>the numerical response code</entry>
</row>
<row>
<entry>protected</entry>
<entry>string</entry>
<entry>responseStatus</entry>
<entry>the literal response status text</entry>
</row>
<row>
<entry>protected</entry>
<entry>integer</entry>
<entry>method</entry>
<entry>the request method to use</entry>
</row>
<row>
<entry>protected</entry>
<entry>string</entry>
<entry>url</entry>
<entry>the request url</entry>
</row>
<row>
<entry>protected</entry>
<entry>string</entry>
<entry>contentType</entry>
<entry>the content type to use for raw post requests</entry>
</row>
<row>
<entry>protected</entry>
<entry>string</entry>
<entry>rawPostData</entry>
<entry>raw post data</entry>
</row>
<row>
<entry>protected</entry>
<entry>string</entry>
<entry>queryData</entry>
<entry>query parameters</entry>
</row>
<row>
<entry>protected</entry>
<entry>string</entry>
<entry>putFile</entry>
<entry>the file to upload with a PUT request</entry>
</row>
<row>
<entry>protected</entry>
<entry>string</entry>
<entry>putData</entry>
<entry>raw data to upload with a PUT request</entry>
</row>
<row>
<entry>protected</entry>
<entry>HttpMessage</entry>
<entry>history</entry>
<entry>the whole request/response history if history logging is enabled</entry>
</row>
<row>
<entry>public</entry>
<entry>boolean</entry>
<entry>recordHistory</entry>
<entry>whether to enable history logging</entry>
</row>
</tbody>
</tgroup>
@ -132,187 +143,227 @@
<row>
<entry>integer</entry>
<entry>METH_GET</entry>
<entry></entry>
<entry>GET request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_HEAD</entry>
<entry></entry>
<entry>HEAD request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_POST</entry>
<entry></entry>
<entry>POST request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_PUT</entry>
<entry></entry>
<entry>PUT request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_DELETE</entry>
<entry></entry>
<entry>DELETE request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_OPTIONS</entry>
<entry></entry>
<entry>OPTIONS request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_TRACE</entry>
<entry></entry>
<entry>TRACE request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_CONNECT</entry>
<entry></entry>
<entry>CONNECT request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_PROPFIND</entry>
<entry></entry>
<entry>PROPFIND request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_PROPPATCH</entry>
<entry></entry>
<entry>PROPPATCH request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_MKCOL</entry>
<entry></entry>
<entry>MKCOL request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_COPY</entry>
<entry></entry>
<entry>COPY request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_MOVE</entry>
<entry></entry>
<entry>MOVE request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_LOCK</entry>
<entry></entry>
<entry>LOCK request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_UNLOCK</entry>
<entry></entry>
<entry>UNLOCK request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_VERSION_CONTROL</entry>
<entry></entry>
<entry>VERSION-CONTROL request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_REPORT</entry>
<entry></entry>
<entry>REPORT request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_CHECKOUT</entry>
<entry></entry>
<entry>CHECKOUT request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_CHECKIN</entry>
<entry></entry>
<entry>CHECKIN request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_UNCHECKOUT</entry>
<entry></entry>
<entry>UNCHECKOUT request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_MKWORKSPACE</entry>
<entry></entry>
<entry>MKWORKSPACE request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_UPDATE</entry>
<entry></entry>
<entry>UPDATE request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_LABEL</entry>
<entry></entry>
<entry>LABEL request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_MERGE</entry>
<entry></entry>
<entry>MERGE request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_BASELINE_CONTROL</entry>
<entry></entry>
<entry>BASELINE-CONTROL request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_MKACTIVITY</entry>
<entry></entry>
<entry>MKACTIVITY request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>METH_ACL</entry>
<entry></entry>
<entry>ACL request method</entry>
</row>
<row>
<entry>integer</entry>
<entry>VERSION_1_0</entry>
<entry></entry>
<entry>HTTP protocol version 1.0</entry>
</row>
<row>
<entry>integer</entry>
<entry>VERSION_1_1</entry>
<entry></entry>
<entry>HTTP protocol version 1.1</entry>
</row>
<row>
<entry>integer</entry>
<entry>VERSION_NONE</entry>
<entry></entry>
<entry>VERSION_ANY</entry>
<entry>any HTTP protocol version</entry>
</row>
<row>
<entry>integer</entry>
<entry>AUTH_BASIC</entry>
<entry></entry>
<entry>basic authentication</entry>
</row>
<row>
<entry>integer</entry>
<entry>AUTH_DIGEST</entry>
<entry></entry>
<entry>digest authentication</entry>
</row>
<row>
<entry>integer</entry>
<entry>AUTH_NTLM</entry>
<entry></entry>
<entry>NTLM authentication</entry>
</row>
<row>
<entry>integer</entry>
<entry>AUTH_GSSNEG</entry>
<entry>GSS negotiate authentication</entry>
</row>
<row>
<entry>integer</entry>
<entry>AUTH_ANY</entry>
<entry></entry>
<entry>any authentication</entry>
</row>
<row>
<entry>integer</entry>
<entry>PROXY_SOCKS4</entry>
<entry></entry>
<entry>SOCKS v4 proxy</entry>
</row>
<row>
<entry>integer</entry>
<entry>PROXY_SOCKS5</entry>
<entry></entry>
<entry>SOCKS v5 proxy</entry>
</row>
<row>
<entry>integer</entry>
<entry>PROXY_HTTP</entry>
<entry></entry>
<entry>HTTP proxy</entry>
</row>
<row>
<entry>integer</entry>
<entry>SSL_VERSION_TLSv1</entry>
<entry>use TLS v1</entry>
</row>
<row>
<entry>integer</entry>
<entry>SSL_VERSION_SSLv2</entry>
<entry>use SSL v2</entry>
</row>
<row>
<entry>integer</entry>
<entry>SSL_VERSION_SSLv3</entry>
<entry>use SSL v3</entry>
</row>
<row>
<entry>integer</entry>
<entry>SSL_VERSION_ANY</entry>
<entry>use any SSL/TLS method</entry>
</row>
<row>
<entry>integer</entry>
<entry>IPRESOLVE_V4</entry>
<entry>resolve via IPv4 only</entry>
</row>
<row>
<entry>integer</entry>
<entry>IPRESOLVE_V6</entry>
<entry>resolve via IPv6 only</entry>
</row>
<row>
<entry>integer</entry>
<entry>IPRESOLVE_ANY</entry>
<entry>use any resolving methos</entry>
</row>
</tbody>
</tgroup>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.HttpRequest-addCookies">
<refnamediv>
@ -15,8 +15,10 @@
</methodsynopsis>
<para>
Add cookies.
Add custom cookies.
</para>
&note.http.request.encodecookies;
&note.http.request.affects.any;
</refsect1>
<refsect1 role="parameters">
@ -27,7 +29,7 @@
<term><parameter>cookies</parameter></term>
<listitem>
<para>
an associative array as parameter containing any cookie name/value pairs to add
an associative array containing any cookie name/value pairs to add
</para>
</listitem>
</varlistentry>
@ -76,49 +78,35 @@
-->
<!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>HttpRequest::addCookies</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';
}
$r = new HttpRequest;
$r->addCookies(
array(
"cookie_name" => "cookie value",
)
);
?>
]]>
</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>
<member><function>HttpRequest::setCookies</function></member>
</simplelist>
</para>
</refsect1>
-->
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-parse-params">
<refnamediv>
@ -86,36 +86,38 @@
-->
<!-- 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';
}
var_dump(http_parse_params("text/html; charset=\"utf8\""));
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Use the PEAR Coding Standards
object(stdClass)#1 (1) {
["params"]=>
array(2) {
[0]=>
string(9) "text/html"
[1]=>
array(1) {
["charset"]=>
string(4) "utf8"
}
}
}
]]>
</screen>
</example>
</para>
</refsect1>
-->
<!-- Use when adding See Also links

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<refentry id="function.http-get">
<refnamediv>
@ -10,183 +10,14 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_get</methodname>
<methodparam choice="opt"><type>string</type><parameter>url</parameter></methodparam>
<methodparam><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</entry><entry>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>
&see.http.request.options;
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
@ -204,7 +35,7 @@
<term><parameter>options</parameter></term>
<listitem>
<para>
<link linkend="http.request.options">HTTP request options</link>
&link.http.request.options;
</para>
</listitem>
</varlistentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.17 $ -->
<!-- $Revision: 1.18 $ -->
<!-- Purpose: basic.php -->
<!-- Membership: pecl -->
@ -162,13 +162,10 @@
</partintro>
&reference.http.install;
&reference.http.configuration;
&reference.http.resources;
&reference.http.constants;
&reference.http.request-options;
&reference.http.HttpMessage;
&reference.http.HttpQueryString;
&reference.http.HttpDeflateStream;
@ -176,6 +173,7 @@
&reference.http.HttpRequest;
&reference.http.HttpRequestPool;
&reference.http.HttpResponse;
&reference.http.functions;
</reference>