- export http_parse_cookie()
[m6w6/ext-http] / docs / functions.html
index b815071d31a3cf5b33523658f2e578956c086127..0e53c616ce4ffb26a736e14107fef50907ba24d4 100644 (file)
@@ -81,7 +81,7 @@ The host will be taken either from the Host HTTP header of the client<br />
 the SERVER_NAME or just localhost if prior are not available.<br />
 If a port is pecified in either the url or as sperate parameter,<br />
 it will be added if it differs from te default port for HTTP(S).</p>
-<p>Returns the absolute URI as string.</p>
+<p>Returns the absolute URI as string on success or false on failure.</p>
 <p>Examples:</p><pre><blockquote><code><span style="color: #000000"><br />
 <span style="color: #0000BB">&lt;?php<br />$uri&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">http_build_uri</span><span style="color: #007700">(</span><span style="color: #DD0000">"page.php"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"https"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">NULL</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">488</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span><br />
 </span></code></blockquote></p>
@@ -253,7 +253,15 @@ several consecutive HTTP messages.</p>
 <p>Expects a string parameter containing HTTP headers.</p>
 <p>Returns an array on success, or FALSE on failure.</p>
 <p>Example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB">&lt;?php<br />$headers&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"content-type:&nbsp;text/html;&nbsp;charset=UTF-8\r\n"</span><span style="color: #007700">.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"Server:&nbsp;Funky/1.0\r\n"</span><span style="color: #007700">.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"Set-Cookie:&nbsp;foo=bar\r\n"</span><span style="color: #007700">.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"Set-Cookie:&nbsp;baz=quux\r\n"</span><span style="color: #007700">.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"Folded:&nbsp;works\r\n\ttoo\r\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">http_parse_headers</span><span style="color: #007700">(</span><span style="color: #0000BB">$headers</span><span style="color: #007700">));<br /><br />Array<br />(<br />&nbsp;&nbsp;&nbsp;&nbsp;[</span><span style="color: #0000BB">Content</span><span style="color: #007700">-</span><span style="color: #0000BB">Type</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">text</span><span style="color: #007700">/</span><span style="color: #0000BB">html</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">chatset</span><span style="color: #007700">=</span><span style="color: #0000BB">UTF</span><span style="color: #007700">-</span><span style="color: #0000BB">8<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">[</span><span style="color: #0000BB">Server</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">Funky</span><span style="color: #007700">/</span><span style="color: #0000BB">1.0<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">[</span><span style="color: #0000BB">Set</span><span style="color: #007700">-</span><span style="color: #0000BB">Cookie</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;Array<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">foo</span><span style="color: #007700">=</span><span style="color: #0000BB">bar<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">baz</span><span style="color: #007700">=</span><span style="color: #0000BB">quux<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;[</span><span style="color: #0000BB">Folded</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">works<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;too&nbsp;<br />?&gt;</span><br />
+<span style="color: #0000BB">&lt;?php<br />$headers&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"content-type:&nbsp;text/html;&nbsp;charset=UTF-8\r\n"</span><span style="color: #007700">.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"Server:&nbsp;Funky/1.0\r\n"</span><span style="color: #007700">.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"Set-Cookie:&nbsp;foo=bar\r\n"</span><span style="color: #007700">.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"Set-Cookie:&nbsp;baz=quux\r\n"</span><span style="color: #007700">.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"Folded:&nbsp;works\r\n\ttoo\r\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">http_parse_headers</span><span style="color: #007700">(</span><span style="color: #0000BB">$headers</span><span style="color: #007700">));<br /><br />Array<br />(<br />&nbsp;&nbsp;&nbsp;&nbsp;[</span><span style="color: #0000BB">Content</span><span style="color: #007700">-</span><span style="color: #0000BB">Type</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">text</span><span style="color: #007700">/</span><span style="color: #0000BB">html</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">chatset</span><span style="color: #007700">=</span><span style="color: #0000BB">UTF</span><span style="color: #007700">-</span><span style="color: #0000BB">8<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">[</span><span style="color: #0000BB">Server</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">Funky</span><span style="color: #007700">/</span><span style="color: #0000BB">1.0<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">[</span><span style="color: #0000BB">Set</span><span style="color: #007700">-</span><span style="color: #0000BB">Cookie</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;Array<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">foo</span><span style="color: #007700">=</span><span style="color: #0000BB">bar<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">baz</span><span style="color: #007700">=</span><span style="color: #0000BB">quux<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;[</span><span style="color: #0000BB">Folded</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">works<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;too&nbsp;<br /></span><span style="color: #007700">)&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span><br />
+</span></code></blockquote></p>
+<p></pre></p>
+<h2 id="http_parse_cookie">object http_parse_cookie(string cookie)</h2>
+<p>Parses HTTP cookies like sent in a response into a struct.</p>
+<p>Expects a string as parameter containing the value of a Set-Cookie response header.</p>
+<p>Returns an stdClass object with the cookie params as properties on success or FALSE on failure.</p>
+<p>Example:</p><pre><blockquote><code><span style="color: #000000"><br />
+<span style="color: #0000BB">&lt;?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">http_parse_cookie</span><span style="color: #007700">(</span><span style="color: #DD0000">"foo=bar;&nbsp;path=/"</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">stdClass&nbsp;Object<br /></span><span style="color: #007700">(<br />&nbsp;&nbsp;&nbsp;&nbsp;[</span><span style="color: #0000BB">name</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">foo<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">[</span><span style="color: #0000BB">value</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">bar<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">[</span><span style="color: #0000BB">path</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;/<br />)<br /></span><span style="color: #0000BB">?&gt;</span><br />
 </span></code></blockquote></p>
 <p></pre></p>
 <h2 id="http_get_request_headers">array http_get_request_headers(void)</h2>
@@ -350,7 +358,7 @@ See http_get() for a full list of available options.</p>
 <p>Returns the request method name as string on success, or FALSE on failure.</p>
 <h2 id="http_build_query">string http_build_query(mixed formdata [, string prefix[, string arg_separator]])</h2>
 <p>Generates a form-encoded query string from an associative array or object.</p>
-<h2 id="http_gzencode">string http_gzencode(string data[, int level = -1])</h2>
+<h2 id="http_gzencode">string http_gzencode(string data[, int level = -1[, int mtime = 0]])</h2>
 <p>Compress data with the HTTP compatible GZIP encoding.</p>
 <p>Expects the first parameter to be a string which contains the data that<br />
 should be encoded.  Additionally accepts an optional in paramter specifying<br />
@@ -361,7 +369,7 @@ best compression ratio.</p>
 <p>Uncompress data compressed with the HTTP compatible GZIP encoding.</p>
 <p>Expects a string as parameter containing the compressed data.</p>
 <p>Returns the decoded string on success, or NULL on failure.</p>
-<h2 id="http_deflate">string http_deflate(string data[, int level = -1])</h2>
+<h2 id="http_deflate">string http_deflate(string data[, int level = -1[, bool zlib_header = false]])</h2>
 <p>Compress data with the HTTP compatible DEFLATE encoding.</p>
 <p>Expects the first parameter to be a string containing the data that should<br />
 be encoded.  Additionally accepts an optional int parameter specifying the<br />
@@ -372,17 +380,6 @@ compression ratio.</p>
 <p>Uncompress data compressed with the HTTP compatible DEFLATE encoding.</p>
 <p>Expects a string as parameter containing the compressed data.</p>
 <p>Returns the decoded string on success, or NULL on failure.</p>
-<h2 id="http_compress">string http_compress(string data[, int level = -1])</h2>
-<p>Compress data with the HTTP compatible COMPRESS encoding.</p>
-<p>Expects the first parameter to be a string containing the data which should<br />
-be encoded.  Additionally accepts an optional int parameter specifying the<br />
-compression level, where -1 is default, 0 is no compression and 9 is best<br />
-compression ratio.</p>
-<p>Returns the encoded string on success, or NULL on failure.</p>
-<h2 id="http_uncompress">string http_uncompress(string data)</h2>
-<p>Uncompress data compressed with the HTTP compatible COMPRESS encoding.</p>
-<p>Expects a string as parameter containing the compressed data.</p>
-<p>Returns the decoded string on success, or NULL on failure.</p>
 <h2 id="http_support">int http_support([int feature = 0])</h2>
 <p>Check for feature that require external libraries.</p>
 <p>Accpepts an optional in parameter specifying which feature to probe for.<br />
@@ -569,7 +566,7 @@ pairs to add.</p>
 <h3 id="HttpRequest_setMethod">bool HttpRequest::setMethod(int request_method)</h3>
 <p>Set the request method.</p>
 <p>Expects an int as parameter specifying the request method to use.<br />
-In PHP 5.1+ HttpRequest::METH, otherwise the HTTP_METH constants can be used.</p>
+In PHP 5.1+ HttpRequest::METH_*, otherwise the HTTP_METH_* constants can be used.</p>
 <p>Returns TRUE on success, or FALSE on failure.</p>
 <h3 id="HttpRequest_getMethod">int HttpRequest::getMethod()</h3>
 <p>Get the previously set request method.</p>
@@ -745,11 +742,11 @@ HttpRequest::getResponse*() methods.</p>
 <p>Throws HttpRuntimeException, HttpRequestException, <br />
 HttpMalformedHeaderException, HttpEncodingException.</p>
 <p>GET example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB">&lt;?php<br />$r&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">HttpRequest</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://example.com/feed.rss'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">HTTP_GET</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setOptions</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'lastmodified'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">filemtime</span><span style="color: #007700">(</span><span style="color: #DD0000">'local.rss'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">addQueryData</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'category'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">));<br />try&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">send</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getResponseCode</span><span style="color: #007700">()&nbsp;==&nbsp;</span><span style="color: #0000BB">200</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">file_put_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">'local.rss'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getResponseBody</span><span style="color: #007700">());<br />&nbsp;&nbsp;&nbsp;}<br />}&nbsp;catch&nbsp;(</span><span style="color: #0000BB">HttpException&nbsp;$ex</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$ex</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span><br />
+<span style="color: #0000BB">&lt;?php<br />$r&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">HttpRequest</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://example.com/feed.rss'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">HttpRequest</span><span style="color: #007700">::</span><span style="color: #0000BB">METH_GET</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setOptions</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'lastmodified'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">filemtime</span><span style="color: #007700">(</span><span style="color: #DD0000">'local.rss'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">addQueryData</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'category'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">));<br />try&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">send</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getResponseCode</span><span style="color: #007700">()&nbsp;==&nbsp;</span><span style="color: #0000BB">200</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">file_put_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">'local.rss'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getResponseBody</span><span style="color: #007700">());<br />&nbsp;&nbsp;&nbsp;}<br />}&nbsp;catch&nbsp;(</span><span style="color: #0000BB">HttpException&nbsp;$ex</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$ex</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span><br />
 </span></code></blockquote></p>
 <p></pre></p>
 <p>POST example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB">&lt;?php<br />$r&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">HttpRequest</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://example.com/form.php'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">HTTP_POST</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setOptions</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'cookies'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(</span><span style="color: #DD0000">'lang'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">'de'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">addPostFields</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'user'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">'mike'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'pass'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">'s3c|r3t'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">addPostFile</span><span style="color: #007700">(</span><span style="color: #DD0000">'image'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'profile.jpg'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'image/jpeg'</span><span style="color: #007700">);<br />try&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">send</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">getBody</span><span style="color: #007700">();<br />}&nbsp;catch&nbsp;(</span><span style="color: #0000BB">HttpException&nbsp;$ex</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$ex</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span><br />
+<span style="color: #0000BB">&lt;?php<br />$r&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">HttpRequest</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://example.com/form.php'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">HttpRequest</span><span style="color: #007700">::</span><span style="color: #0000BB">METH_POST</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setOptions</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'cookies'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(</span><span style="color: #DD0000">'lang'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">'de'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">addPostFields</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'user'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">'mike'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'pass'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">'s3c|r3t'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">addPostFile</span><span style="color: #007700">(</span><span style="color: #DD0000">'image'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'profile.jpg'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'image/jpeg'</span><span style="color: #007700">);<br />try&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$r</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">send</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">getBody</span><span style="color: #007700">();<br />}&nbsp;catch&nbsp;(</span><span style="color: #0000BB">HttpException&nbsp;$ex</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$ex</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span><br />
 </span></code></blockquote></p>
 <p></pre></p>
 <hr noshade>
@@ -759,10 +756,10 @@ HttpMalformedHeaderException, HttpEncodingException.</p>
 <p>Instantiate a new HttpRequestPool object.  An HttpRequestPool is<br />
 able to send several HttpRequests in parallel.</p>
 <p>WARNING: Don't attach/detach HttpRequest objects to the HttpRequestPool<br />
-object while you're using the implemented Interator interface. </p>
+object while you're using the implemented Iterator interface. </p>
 <p>Accepts virtual infinite optional parameters each referencing an<br />
 HttpRequest object.</p>
-<p>Throws HttpRequestException, HttpRequestPoolException, HttpInvalidParamException.</p>
+<p>Throws HttpRequestPoolException (HttpRequestException, HttpInvalidParamException).</p>
 <p>Example:</p><pre><blockquote><code><span style="color: #000000"><br />
 <span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">try&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$pool&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">HttpRequestPool</span><span style="color: #007700">(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">HttpRequest</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://www.google.com/'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">HttpRequest</span><span style="color: #007700">::</span><span style="color: #0000BB">METH_HEAD</span><span style="color: #007700">),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">HttpRequest</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://www.php.net/'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">HttpRequest</span><span style="color: #007700">::</span><span style="color: #0000BB">METH_HEAD</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$pool</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">send</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;foreach(</span><span style="color: #0000BB">$pool&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$request</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"%s&nbsp;is&nbsp;%s&nbsp;(%d)\n"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$request</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getUrl</span><span style="color: #007700">(),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$request</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getResponseCode</span><span style="color: #007700">()&nbsp;?&nbsp;</span><span style="color: #DD0000">'alive'&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">'not&nbsp;alive'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$request</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getResponseCode</span><span style="color: #007700">()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}&nbsp;catch&nbsp;(</span><span style="color: #0000BB">HttpException&nbsp;$e</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$e</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span><br />
 </span></code></blockquote></p>
@@ -788,8 +785,7 @@ HttpRequestPool object.</p>
 <h3 id="HttpRequestPool_send">bool HttpRequestPool::send()</h3>
 <p>Send all attached HttpRequest objects in parallel.</p>
 <p>Returns TRUE on success, or FALSE on failure.</p>
-<p>Throws HttpSocketException, HttpRequestException, <br />
-HttpRequestPoolException, HttpMalformedHeaderException.</p>
+<p>Throws HttpRequestPoolException (HttpSocketException, HttpRequestException, HttpMalformedHeaderException).</p>
 <h3 id="HttpRequestPool_socketPerform">protected bool HttpRequestPool::socketPerform()</h3>
 <p>Returns TRUE until each request has finished its transaction.</p>
 <p>Usage:</p><pre><blockquote><code><span style="color: #000000"><br />
@@ -1023,6 +1019,8 @@ http.cache_log is set.</p>
 </li>
 <li><a href="#http_parse_headers">http_parse_headers</a>
 </li>
+<li><a href="#http_parse_cookie">http_parse_cookie</a>
+</li>
 <li><a href="#http_get_request_headers">http_get_request_headers</a>
 </li>
 <li><a href="#http_get_request_body">http_get_request_body</a>
@@ -1059,10 +1057,6 @@ http.cache_log is set.</p>
 </li>
 <li><a href="#http_inflate">http_inflate</a>
 </li>
-<li><a href="#http_compress">http_compress</a>
-</li>
-<li><a href="#http_uncompress">http_uncompress</a>
-</li>
 <li><a href="#http_support">http_support</a>
 </li>
 </ul>
@@ -1201,7 +1195,7 @@ http.cache_log is set.</p>
 </li>
 </ul>
 </div>
-    <p><b>Generated at: Mon, 21 Nov 2005 16:56:18 +0100</b></p>
+    <p><b>Generated at: Wed, 14 Dec 2005 16:25:48 +0100</b></p>
 </body>
 </html>