looking like: "Wed, 22 Dec 2004 11:34:47 GMT"</p>
<p>Accepts an optional unix timestamp as parameter.</p>
<p>Returns the HTTP date as string.</p>
-<h2 id="http_build_url">string http_build_url(mixed url[, mixed parts[, int flags = HTTP_URL_REPLACE[, array &new_url]]])</h2>
+<h2 id="http_build_url">string http_build_url([mixed url[, mixed parts[, int flags = HTTP_URL_REPLACE[, array &new_url]]]])</h2>
<p>Build an URL.</p>
<p>Expexts (part(s) of) an URL as first parameter in form of a string or assoziative array<br />
like parse_url() returns. Accepts an optional second parameter in the same way as the<br />
<p>The parts of the second URL will be merged into the first according to the flags argument.<br />
The following flags are recognized:</p><pre> - HTTP_URL_REPLACE: (default) set parts of the second url will replace the parts in the first<br />
- HTTP_URL_JOIN_PATH: the path of the second url will be merged into the one of the first<br />
- - HTTP_URL_JOIN_QUERY: the two querystrings will be merged naivly; no replacements are done<br />
+ - HTTP_URL_JOIN_QUERY: the two querystrings will be merged recursively<br />
- HTTP_URL_STRIP_USER: the user part will not appear in the result<br />
- HTTP_URL_STRIP_PASS: the password part will not appear in the result<br />
- HTTP_URL_STRIP_AUTH: neither the user nor the password part will appear in the result<br />
the Last-Modified header is updated and the actual body will be sent.</p>
<p>Returns FALSE on failure, or *exits* with "304 Not Modified" if the entity is cached.</p>
<p>A log entry will be written to the cache log if the INI entry<br />
-http.cache_log is set and the cache attempt was successful.</p>
+http.log.cache is set and the cache attempt was successful.</p>
<h2 id="http_cache_etag">bool http_cache_etag([string etag])</h2>
<p>Attempts to cache the sent entity by its ETag, either supplied or generated <br />
-by the hash algorithm specified by the INI setting "http.etag_mode".</p>
+by the hash algorithm specified by the INI setting "http.etag.mode".</p>
<p>If the clients "If-None-Match" header matches the supplied/calculated<br />
ETag, the body is considered cached on the clients side and<br />
a "304 Not Modified" status code is issued.</p>
<p>Returns FALSE on failure, or *exits* with "304 Not Modified" if the entity is cached.</p>
<p>A log entry is written to the cache log if the INI entry<br />
-"http.cache_log" is set and the cache attempt was successful.</p>
+"http.log.cache" is set and the cache attempt was successful.</p>
<h2 id="ob_etaghandler">string ob_etaghandler(string data, int mode)</h2>
<p>For use with ob_start(). Output buffer handler generating an ETag with<br />
-the hash algorithm specified with the INI setting "http.etag_mode".</p>
+the hash algorithm specified with the INI setting "http.etag.mode".</p>
<h2 id="http_throttle">void http_throttle(double sec[, int bytes = 40960])</h2>
<p>Sets the throttle delay and send buffer size for use with http_send() API.<br />
Provides a basic throttling mechanism, which will yield the current process<br />
another one than HEAD.</p>
<p>Returns FALSE on failure, or *exits* on success.</p>
<p>A log entry will be written to the redirect log, if the INI entry<br />
-"http.redirect_log" is set and the redirect attempt was successful.</p>
+"http.log.redirect" is set and the redirect attempt was successful.</p>
<h2 id="http_send_data">bool http_send_data(string data)</h2>
<p>Sends raw data with support for (multiple) range requests.</p>
<p>Returns TRUE on success, or FALSE on failure.</p>
<span style="color: #0000BB"><?php<br />$headers </span><span style="color: #007700">= </span><span style="color: #DD0000">"content-type: text/html; charset=UTF-8\r\n"</span><span style="color: #007700">.<br /> </span><span style="color: #DD0000">"Server: Funky/1.0\r\n"</span><span style="color: #007700">.<br /> </span><span style="color: #DD0000">"Set-Cookie: foo=bar\r\n"</span><span style="color: #007700">.<br /> </span><span style="color: #DD0000">"Set-Cookie: baz=quux\r\n"</span><span style="color: #007700">.<br /> </span><span style="color: #DD0000">"Folded: 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 /> [</span><span style="color: #0000BB">Content</span><span style="color: #007700">-</span><span style="color: #0000BB">Type</span><span style="color: #007700">] => </span><span style="color: #0000BB">text</span><span style="color: #007700">/</span><span style="color: #0000BB">html</span><span style="color: #007700">; </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 /> </span><span style="color: #007700">[</span><span style="color: #0000BB">Server</span><span style="color: #007700">] => </span><span style="color: #0000BB">Funky</span><span style="color: #007700">/</span><span style="color: #0000BB">1.0<br /> </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">] => Array<br /> (<br /> [</span><span style="color: #0000BB">0</span><span style="color: #007700">] => </span><span style="color: #0000BB">foo</span><span style="color: #007700">=</span><span style="color: #0000BB">bar<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">] => </span><span style="color: #0000BB">baz</span><span style="color: #007700">=</span><span style="color: #0000BB">quux<br /> </span><span style="color: #007700">)<br /> [</span><span style="color: #0000BB">Folded</span><span style="color: #007700">] => </span><span style="color: #0000BB">works<br /> too <br /></span><span style="color: #007700">) <br /></span><span style="color: #0000BB">?></span><br />
</span></code></blockquote></p>
<p></pre></p>
-<h2 id="http_parse_cookie">object http_parse_cookie(string cookie)</h2>
+<h2 id="http_parse_cookie">object http_parse_cookie(string cookie[, int flags[, array allowed_extras]])</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>Returns an stdClass olike shown in the example on success or FALSE on failure.</p>
<p>Example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?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; path=/"</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">stdClass Object<br /></span><span style="color: #007700">(<br /> [</span><span style="color: #0000BB">name</span><span style="color: #007700">] => </span><span style="color: #0000BB">foo<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">value</span><span style="color: #007700">] => </span><span style="color: #0000BB">bar<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">path</span><span style="color: #007700">] => /<br />)<br /></span><span style="color: #0000BB">?></span><br />
+<span style="color: #0000BB"><?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; bar=baz; path=/; domain=example.com; comment=; secure"</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">, array(</span><span style="color: #DD0000">"comment"</span><span style="color: #007700">)));<br /><br /></span><span style="color: #0000BB">stdClass Object<br /></span><span style="color: #007700">(<br /> [</span><span style="color: #0000BB">cookies</span><span style="color: #007700">] => Array<br /> (<br /> [</span><span style="color: #0000BB">foo</span><span style="color: #007700">] => </span><span style="color: #0000BB">bar<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">bar</span><span style="color: #007700">] => </span><span style="color: #0000BB">baz<br /> </span><span style="color: #007700">)<br /><br /> [</span><span style="color: #0000BB">extras</span><span style="color: #007700">] => Array<br /> (<br /> [</span><span style="color: #0000BB">comment</span><span style="color: #007700">] =><br /> )<br /><br /> [</span><span style="color: #0000BB">flags</span><span style="color: #007700">] => </span><span style="color: #0000BB">16<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">expires</span><span style="color: #007700">] => </span><span style="color: #0000BB">0<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">path</span><span style="color: #007700">] => /<br /> [</span><span style="color: #0000BB">domain</span><span style="color: #007700">] => </span><span style="color: #0000BB">example</span><span style="color: #007700">.</span><span style="color: #0000BB">com<br /></span><span style="color: #007700">)<br /></span><span style="color: #0000BB">?></span><br />
</span></code></blockquote></p>
<p></pre></p>
+<h2 id="http_parse_params">object http_parse_params(string param[, int flags = HTTP_PARAMS_DEFAULT])</h2>
+<p>Parse parameter list.</p>
<h2 id="http_get_request_headers">array http_get_request_headers(void)</h2>
<p>Get a list of incoming HTTP headers.</p>
<p>Returns an associative array of incoming request headers.</p>
redirects to a different host<br />
- proxyhost: string, proxy host in "host[:port]" format<br />
- proxyport: int, use another proxy port as specified in proxyhost<br />
+ - proxytype: int, HTTP_PROXY_HTTP, SOCKS4 or SOCKS5<br />
- proxyauth: string, proxy credentials in "user:pass" format<br />
- proxyauthtype: int, HTTP_AUTH_BASIC and/or HTTP_AUTH_NTLM<br />
- httpauth: string, http credentials in "user:pass" format<br />
- cookies: array, list of cookies as associative array<br />
like array("cookie" => "value")<br />
- encodecookies: bool, whether to urlencode the cookies (default: true)<br />
- - resetcookies: bool, wheter to reset the cookies<br />
- cookiestore: string, path to a file where cookies are/will be stored<br />
+ - cookiesession: bool, don't load session cookies from cookiestore if TRUE<br />
- resume: int, byte offset to start the download from;<br />
if the server supports ranges<br />
+ - range: array, array of arrays, each containing two integers,<br />
+ specifying the ranges to download if server support is<br />
+ given; only recognized if the resume option is empty<br />
- maxfilesize: int, maximum file size that should be downloaded;<br />
has no effect, if the size of the requested entity is not known<br />
- lastmodified: int, timestamp for If-(Un)Modified-Since header<br />
- timeout: int, seconds the request may take<br />
- connecttimeout: int, seconds the connect may take<br />
- onprogress: mixed, progress callback<br />
+ - interface: string, outgoing network interface (ifname, ip or hostname)<br />
+ - portrange: array, 2 integers specifying outgoing portrange to try<br />
- ssl: array, with the following options:<br />
cert: string, path to certificate<br />
certtype: string, type of certificate<br />
</pre></p>
<p>The optional third parameter will be filled with some additional information<br />
in form of an associative array, if supplied, like the following example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br /></span><span style="color: #007700">array (<br /> </span><span style="color: #DD0000">'effective_url' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'http://localhost'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'response_code' </span><span style="color: #007700">=> </span><span style="color: #0000BB">403</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'total_time' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0.017</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'namelookup_time' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0.013</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'connect_time' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0.014</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'pretransfer_time' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0.014</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'size_upload' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'size_download' </span><span style="color: #007700">=> </span><span style="color: #0000BB">202</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'speed_download' </span><span style="color: #007700">=> </span><span style="color: #0000BB">11882</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'speed_upload' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'header_size' </span><span style="color: #007700">=> </span><span style="color: #0000BB">145</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'request_size' </span><span style="color: #007700">=> </span><span style="color: #0000BB">62</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'ssl_verifyresult' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'filetime' </span><span style="color: #007700">=> -</span><span style="color: #0000BB">1</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'content_length_download' </span><span style="color: #007700">=> </span><span style="color: #0000BB">202</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'content_length_upload' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'starttransfer_time' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0.017</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'content_type' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'text/html; charset=iso-8859-1'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'redirect_time' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'redirect_count' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'http_connectcode' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'httpauth_avail' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'proxyauth_avail' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br />)<br /></span><span style="color: #0000BB">?></span><br />
+<span style="color: #0000BB"><?php<br /></span><span style="color: #007700">array (<br /> </span><span style="color: #DD0000">'effective_url' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'http://www.example.com/'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'response_code' </span><span style="color: #007700">=> </span><span style="color: #0000BB">302</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'connect_code' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'filetime' </span><span style="color: #007700">=> -</span><span style="color: #0000BB">1</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'total_time' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0.212348</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'namelookup_time' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0.038296</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'connect_time' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0.104144</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'pretransfer_time' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0.104307</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'starttransfer_time' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0.212077</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'redirect_time' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'redirect_count' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'size_upload' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'size_download' </span><span style="color: #007700">=> </span><span style="color: #0000BB">218</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'speed_download' </span><span style="color: #007700">=> </span><span style="color: #0000BB">1026</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'speed_upload' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'header_size' </span><span style="color: #007700">=> </span><span style="color: #0000BB">307</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'request_size' </span><span style="color: #007700">=> </span><span style="color: #0000BB">103</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'ssl_verifyresult' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'ssl_engines' </span><span style="color: #007700">=><br /> array (<br /> </span><span style="color: #0000BB">0 </span><span style="color: #007700">=> </span><span style="color: #DD0000">'dynamic'</span><span style="color: #007700">,<br /> </span><span style="color: #0000BB">1 </span><span style="color: #007700">=> </span><span style="color: #DD0000">'cswift'</span><span style="color: #007700">,<br /> </span><span style="color: #0000BB">2 </span><span style="color: #007700">=> </span><span style="color: #DD0000">'chil'</span><span style="color: #007700">,<br /> </span><span style="color: #0000BB">3 </span><span style="color: #007700">=> </span><span style="color: #DD0000">'atalla'</span><span style="color: #007700">,<br /> </span><span style="color: #0000BB">4 </span><span style="color: #007700">=> </span><span style="color: #DD0000">'nuron'</span><span style="color: #007700">,<br /> </span><span style="color: #0000BB">5 </span><span style="color: #007700">=> </span><span style="color: #DD0000">'ubsec'</span><span style="color: #007700">,<br /> </span><span style="color: #0000BB">6 </span><span style="color: #007700">=> </span><span style="color: #DD0000">'aep'</span><span style="color: #007700">,<br /> </span><span style="color: #0000BB">7 </span><span style="color: #007700">=> </span><span style="color: #DD0000">'sureware'</span><span style="color: #007700">,<br /> </span><span style="color: #0000BB">8 </span><span style="color: #007700">=> </span><span style="color: #DD0000">'4758cca'</span><span style="color: #007700">,<br /> ),<br /> </span><span style="color: #DD0000">'content_length_download' </span><span style="color: #007700">=> </span><span style="color: #0000BB">218</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'content_length_upload' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'content_type' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'text/html'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'httpauth_avail' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'proxyauth_avail' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'num_connects' </span><span style="color: #007700">=> </span><span style="color: #0000BB">1</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'os_errno' </span><span style="color: #007700">=> </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'error' </span><span style="color: #007700">=> </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br /> )<br /></span><span style="color: #0000BB">?></span><br />
</span></code></blockquote></p>
<p></pre></p>
<p>Returns the HTTP response(s) as string on success, or FALSE on failure.</p>
<p>Expects the second parameter to be a resource referencing an already <br />
opened stream, from which the data to upload should be read.<br />
See http_get() for a full list of available options.</p>
-<p>Returns the HTTP response(s) as string on success. or FALSE on failure.</p>
+<p>Returns the HTTP response(s) as string on success, or FALSE on failure.</p>
+<h2 id="http_put_data">string http_put_data(string url, string data[, array options[, array &info]])</h2>
+<p>Performs an HTTP PUT request on the supplied url.</p>
+<p>Expects the second parameter to be a string containing the data to upload.<br />
+See http_get() for a full list of available options.</p>
+<p>Returns the HTTP response(s) as string on success, or FALSE on failure.</p>
+<h2 id="http_request">string http_request(int method, string url[, string body[, array options[, array &info]]])</h2>
+<p>Performs a custom HTTP request on the supplied url.</p>
+<p>Expects the first parameter to be an integer specifying the request method to use.<br />
+Accepts an optional third string parameter containing the raw request body.<br />
+See http_get() for a full list of available options.</p>
+<p>Returns the HTTP response(s) as string on success, or FALSE on failure.</p>
+<h2 id="http_request_body_encode">string http_request_body_encode(array fields, array files)</h2>
+<p>Generate x-www-form-urlencoded resp. form-data encoded request body.</p>
+<p>Returns encoded string on success, or FALSE on failure.</p>
<h2 id="http_request_method_register">int http_request_method_register(string method)</h2>
<p>Register a custom request method.</p>
<p>Expects a string parameter containing the request method name to register.</p>
<hr noshade>
<h1 id="http_inflatestream_object.c">http_inflatestream_object.c</h1>
<h2 id="HttpInflateStream" class="o">HttpInflateStream</h2>
+<h3 id="HttpInflateStream___construct">void HttpInflateStream::__construct([int flags = 0])</h3>
+<p>Creates a new HttpInflateStream object instance.</p>
+<p>Accepts an optional int parameter specifying how to initialize the inflate stream.</p>
<h3 id="HttpInflateStream_update">string HttpInflateStream::update(string data)</h3>
<p>Passes more data through the inflate stream.</p>
<p>Expects a string parameter containing (a part of) the data to inflate.</p>
<p>Set the body of the HttpMessage.<br />
NOTE: Don't forget to update any headers accordingly.</p>
<p>Expects a string parameter containing the new body of the message.</p>
+<h3 id="HttpMessage_getHeader">string HttpMessage::getHeader(string header)</h3>
+<p>Get message header.</p>
+<p>Returns the header value on success or NULL if the header does not exist.</p>
<h3 id="HttpMessage_getHeaders">array HttpMessage::getHeaders()</h3>
<p>Get Message Headers.</p>
<p>Returns an associative array containing the messages HTTP headers.</p>
<p>Set the HTTP Protocol version of the Message.</p>
<p>Expects a string parameter containing the HTTP protocol version.</p>
<p>Returns TRUE on success, or FALSE if supplied version is out of range (1.0/1.1).</p>
+<h3 id="HttpMessage_guessContentType">string HttpMessage::guessContentType(string magic_file[, int magic_mode = MAGIC_MIME])</h3>
+<p>Attempts to guess the content type of supplied payload through libmagic.</p>
+<p>Expects a string parameter specifying the magic.mime database to use.<br />
+Additionally accepts an optional int parameter, being flags for libmagic.</p>
+<p>Returns the guessed content type on success, or FALSE on failure.</p>
+<p>Throws HttpRuntimeException, HttpInvalidParamException <br />
+if http.only_exceptions is TRUE.</p>
<h3 id="HttpMessage_getParentMessage">HttpMessage HttpMessage::getParentMessage()</h3>
<p>Get parent Message.</p>
<p>Returns the parent HttpMessage on success, or NULL if there's none.</p>
+<p>Throws HttpRuntimeException.</p>
<h3 id="HttpMessage_send">bool HttpMessage::send()</h3>
<p>Send the Message according to its type as Response or Request.<br />
This provides limited functionality compared to HttpRequest and HttpResponse.</p>
<p>Re-constructs the HttpMessage based upon the serialized string.</p>
<h3 id="HttpMessage_detach">HttpMessage HttpMessage::detach(void)</h3>
<p>Returns a clone of an HttpMessage object detached from any parent messages.</p>
-<h3 id="HttpMessage_prepend">void HttpMessage::prepend(HttpMessage message)</h3>
+<h3 id="HttpMessage_prepend">void HttpMessage::prepend(HttpMessage message[, bool top = true])</h3>
<p>Prepends message(s) to the HTTP message.</p>
<p>Expects an HttpMessage object as parameter.</p>
+<p>Throws HttpInvalidParamException if the message is located within the same message chain.</p>
<h3 id="HttpMessage_reverse">HttpMessage HttpMessage::reverse()</h3>
<p>Reorders the message chain in reverse order.</p>
<p>Returns the most parent HttpMessage object.</p>
<hr noshade>
<h1 id="http_querystring_object.c">http_querystring_object.c</h1>
<h2 id="HttpQueryString" class="o">HttpQueryString</h2>
-<h3 id="HttpQueryString___construct">void HttpQueryString::__construct([bool global = true[, mixed add])</h3>
+<h3 id="HttpQueryString___construct">final void HttpQueryString::__construct([bool global = true[, mixed add])</h3>
<p>Creates a new HttpQueryString object instance.<br />
Operates on and modifies $_GET and $_SERVER['QUERY_STRING'] if global is TRUE.</p>
<h3 id="HttpQueryString_toString">string HttpQueryString::toString()</h3>
"b" for bool, "i" for int, "f" for float, "s" for string, "a" for array and "o" for a stdClass object.</p>
<h3 id="HttpQueryString_set">string HttpQueryString::set(mixed params)</h3>
<p>Set query string entry/entries. NULL values will unset the variable.</p>
-<h3 id="HttpQueryString_getInstance">HttpQueryString HttpQueryString::getInstance([bool global = true])</h3>
+<h3 id="HttpQueryString_mod">HttpQueryString HttpQueryString::mod(mixed params)</h3>
+<p>Copies the query string object and sets provided params at the clone.<br />
+This is basically shorthand for:</p><pre><blockquote><code><span style="color: #000000"><br />
+<span style="color: #0000BB"><?php<br />$newQS </span><span style="color: #007700">= new </span><span style="color: #0000BB">HttpQueryString</span><span style="color: #007700">(</span><span style="color: #0000BB">false</span><span style="color: #007700">, </span><span style="color: #0000BB">$oldQS</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$newQS</span><span style="color: #007700">-></span><span style="color: #0000BB">set</span><span style="color: #007700">(</span><span style="color: #0000BB">$other_params</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span><br />
+</span></code></blockquote></p>
+<p></pre></p>
+<h3 id="HttpQueryString_singleton">static HttpQueryString HttpQueryString::singleton([bool global = true])</h3>
<p>Get a single instance (differentiates between the global setting).</p>
+<h3 id="HttpQueryString_xlate">bool HttpQueryString::xlate(string ie, string oe)</h3>
+<p>Converts the query string from the source encoding ie to the target encoding oe.<br />
+WARNING: Don't use any character set that can contain NUL bytes like UTF-16.</p>
+<p>Returns TRUE on success or FALSE on failure.</p>
+<h3 id="HttpQueryString_serialize">string HttpQueryString::serialize()</h3>
+<p>Implements Serializable.</p>
+<h3 id="HttpQueryString_unserialize">void HttpQueryString::unserialize(string serialized)</h3>
+<p>Implements Serializable.</p>
+<h3 id="HttpQueryString_offsetGet">mixed HttpQueryString::offsetGet(string offset)</h3>
+<p>Implements ArrayAccess.</p>
+<h3 id="HttpQueryString_offsetSet">void HttpQueryString::offsetSet(string offset, mixed value)</h3>
+<p>Implements ArrayAccess.</p>
+<h3 id="HttpQueryString_offsetExists">bool HttpQueryString::offsetExists(string offset)</h3>
+<p>Implements ArrayAccess.</p>
+<h3 id="HttpQueryString_offsetUnset">void HttpQueryString::offsetUnset(string offset)</h3>
+<p>Implements ArrayAccess.</p>
<hr noshade>
<h1 id="http_request_object.c">http_request_object.c</h1>
<h2 id="HttpRequest" class="o">HttpRequest</h2>
<h3 id="HttpRequest_getCookies">array HttpRequest::getCookies()</h3>
<p>Get previously set cookies.</p>
<p>Returns an associative array containing any previously set cookies.</p>
+<h3 id="HttpRequest_enableCookies">bool HttpRequest::enableCookies()</h3>
+<p>Enable automatic sending of received cookies.<br />
+Note that cuutomly set cookies will be sent anyway.</p>
+<h3 id="HttpRequest_resetCookies">bool HttpRequest::resetCookies([bool session_only = FALSE])</h3>
+<p>Reset all automatically received/sent cookies.<br />
+Note that customly set cookies are not affected.</p>
+<p>Accepts an optional bool parameter specifying<br />
+whether only session cookies should be reset<br />
+(needs libcurl >= v7.15.4, else libcurl >= v7.14.1).</p>
+<p>Returns TRUE on success, or FALSE on failure.</p>
<h3 id="HttpRequest_setUrl">bool HttpRequest::setUrl(string url)</h3>
<p>Set the request URL.</p>
<p>Expects a string as parameter specifying the request url.</p>
<h3 id="HttpRequest_getPutFile">string HttpRequest::getPutFile()</h3>
<p>Get previously set put file.</p>
<p>Returns a string containing the path to the currently set put file.</p>
+<h3 id="HttpRequest_setPutData">bool HttpRequest::setPutData([string put_data])</h3>
+<p>Set PUT data to send, overwriting previously set PUT data.<br />
+Affects only PUT requests.<br />
+Only either PUT data or PUT file can be used for each request.<br />
+PUT data has higher precedence and will be used even if a PUT<br />
+file is set. </p>
+<p>Accepts a string as parameter containing the data to upload.</p>
+<p>Returns TRUE on success, or FALSE on failure.</p>
+<h3 id="HttpRequest_addPutData">bool HttpRequest::addPutData(string put_data)</h3>
+<p>Add PUT data, leaving previously set PUT data unchanged.<br />
+Affects only PUT requests.</p>
+<p>Expects a string as parameter containing the data to concatenate.</p>
+<p>Returns TRUE on success, or FALSE on failure.</p>
+<h3 id="HttpRequest_getPutData">string HttpRequest::getPutData()</h3>
+<p>Get previously set PUT data.</p>
+<p>Returns a string containing the currently set raw post data.</p>
<h3 id="HttpRequest_getResponseData">array HttpRequest::getResponseData()</h3>
<p>Get all response data after the request has been sent.</p>
<p>Returns an associative array with the key "headers" containing an associative<br />
FALSE on failure, or an associative array containing all response headers.</p>
<p>If redirects were allowed and several responses were received, the data <br />
references the last received response.</p>
-<h3 id="HttpRequest_getResponseCookie">array HttpRequest::getResponseCookie([string name])</h3>
+<h3 id="HttpRequest_getResponseCookies">array HttpRequest::getResponseCookies([int flags[, array allowed_extras]])</h3>
<p>Get response cookie(s) after the request has been sent.</p>
-<p>Accepts a string as optional parameter specifying the name of the cookie to read.<br />
-If the parameter is empty or omitted, an associative array with all received<br />
-cookies will be returned.</p>
-<p>Returns either an associative array with the cookie's name, value and any<br />
-additional params of the cookie matching name if requested, FALSE on failure,<br />
-or an array containing all received cookies as arrays.</p>
+<p>Returns an array of stdClass objects like http_parse_cookie would return.</p>
<p>If redirects were allowed and several responses were received, the data <br />
references the last received response.</p>
<h3 id="HttpRequest_getResponseBody">string HttpRequest::getResponseBody()</h3>
references the last received response. Use HttpMessage::getParentMessage()<br />
to access the data of previously received responses within this request<br />
cycle.</p>
-<p>Throws HttpException.</p>
+<p>Throws HttpException, HttpRuntimeException.</p>
<h3 id="HttpRequest_getRequestMessage">HttpMessage HttpRequest::getRequestMessage()</h3>
<p>Get sent HTTP message.</p>
<p>Returns an HttpMessage object representing the sent request.</p>
<p>Returns the complete web server response, including the headers in a form of a string.</p>
<h3 id="HttpRequest_getHistory">HttpMessage HttpRequest::getHistory()</h3>
<p>Get all sent requests and received responses as an HttpMessage object.</p>
-<p>If you don't want to record history at all, set the instance variable<br />
-HttpRequest::$recordHistory to FALSE. </p>
+<p>If you want to record history, set the instance variable<br />
+HttpRequest::$recordHistory to TRUE.</p>
<p>Returns an HttpMessage object representing the complete request/response<br />
history.</p>
<p>The object references the last received response, use HttpMessage::getParentMessage() <br />
to access the data of previously sent requests and received responses.</p>
-<p>Note that the internal history is immutable, that means that any changes<br />
-you make the the message list won't affect a history message list newly <br />
-created by another call to HttpRequest::getHistory().</p>
-<p>Throws HttpMalformedHeaderException, HttpEncodingException.</p>
+<p>Throws HttpRuntimeException.</p>
<h3 id="HttpRequest_clearHistory">void HttpRequest::clearHistory()</h3>
<p>Clear the history.</p>
<h3 id="HttpRequest_send">HttpMessage HttpRequest::send()</h3>
<p>Accepts a string as optional parameter which specifies the name of the<br />
header to read. If the parameter is empty or omitted, an associative array<br />
with all headers will be returned.</p>
+<p>NOTE: In Apache2 this only works for PHP-5.1.3 and greater.</p>
<p>Returns either a string containing the value of the header matching name,<br />
FALSE on failure, or an associative array with all headers.</p>
<h3 id="HttpResponse_setCache">static bool HttpResponse::setCache(bool cache)</h3>
<h3 id="HttpResponse_getGzip">static bool HttpResponse::getGzip()</h3>
<p>Get current gzipping setting.</p>
<p>Returns TRUE if GZip compression is enabled, else FALSE.</p>
-<h3 id="HttpResponse_setCacheControl">static bool HttpResponse::setCacheControl(string control[, int max_age = 0])</h3>
+<h3 id="HttpResponse_setCacheControl">static bool HttpResponse::setCacheControl(string control[, int max_age = 0[, bool must_revalidate = true]])</h3>
<p>Set a custom cache-control header, usually being "private" or "public";<br />
The max_age parameter controls how long the cache entry is valid on the client side.</p>
<p>Expects a string parameter containing the primary cache control setting.<br />
-Additionally accepts an int parameter specifying the max-age setting.</p>
+Additionally accepts an int parameter specifying the max-age setting.<br />
+Accepts an optional third bool parameter indicating whether the cache<br />
+must be revalidated every request.</p>
<p>Returns TRUE on success, or FALSE if control does not match one of<br />
"public" , "private" or "no-cache".</p>
<p>Throws HttpInvalidParamException if http.only_exceptions is TRUE.</p>
</li>
<li><a href="#http_parse_cookie">http_parse_cookie</a>
</li>
+<li><a href="#http_parse_params">http_parse_params</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>
</li>
<li><a href="#http_put_stream">http_put_stream</a>
</li>
+<li><a href="#http_put_data">http_put_data</a>
+</li>
+<li><a href="#http_request">http_request</a>
+</li>
+<li><a href="#http_request_body_encode">http_request_body_encode</a>
+</li>
<li><a href="#http_request_method_register">http_request_method_register</a>
</li>
<li><a href="#http_request_method_unregister">http_request_method_unregister</a>
</li>
<li><a class="tocfile" href="#http_inflatestream_object.c">http_inflatestream_object.c</a>
<ul>
+<li><a href="#HttpInflateStream___construct">HttpInflateStream::__construct()</a></li>
<li><a href="#HttpInflateStream_update">HttpInflateStream::update()</a></li>
<li><a href="#HttpInflateStream_flush">HttpInflateStream::flush()</a></li>
<li><a href="#HttpInflateStream_finish">HttpInflateStream::finish()</a></li>
<li><a href="#HttpMessage_fromString">HttpMessage::fromString()</a></li>
<li><a href="#HttpMessage_getBody">HttpMessage::getBody()</a></li>
<li><a href="#HttpMessage_setBody">HttpMessage::setBody()</a></li>
+<li><a href="#HttpMessage_getHeader">HttpMessage::getHeader()</a></li>
<li><a href="#HttpMessage_getHeaders">HttpMessage::getHeaders()</a></li>
<li><a href="#HttpMessage_setHeaders">HttpMessage::setHeaders()</a></li>
<li><a href="#HttpMessage_addHeaders">HttpMessage::addHeaders()</a></li>
<li><a href="#HttpMessage_setRequestUrl">HttpMessage::setRequestUrl()</a></li>
<li><a href="#HttpMessage_getHttpVersion">HttpMessage::getHttpVersion()</a></li>
<li><a href="#HttpMessage_setHttpVersion">HttpMessage::setHttpVersion()</a></li>
+<li><a href="#HttpMessage_guessContentType">HttpMessage::guessContentType()</a></li>
<li><a href="#HttpMessage_getParentMessage">HttpMessage::getParentMessage()</a></li>
<li><a href="#HttpMessage_send">HttpMessage::send()</a></li>
<li><a href="#HttpMessage_toString">HttpMessage::toString()</a></li>
<li><a href="#HttpQueryString_toArray">HttpQueryString::toArray()</a></li>
<li><a href="#HttpQueryString_get">HttpQueryString::get()</a></li>
<li><a href="#HttpQueryString_set">HttpQueryString::set()</a></li>
-<li><a href="#HttpQueryString_getInstance">HttpQueryString::getInstance()</a></li>
+<li><a href="#HttpQueryString_mod">HttpQueryString::mod()</a></li>
+<li><a href="#HttpQueryString_singleton">HttpQueryString::singleton()</a></li>
+<li><a href="#HttpQueryString_xlate">HttpQueryString::xlate()</a></li>
+<li><a href="#HttpQueryString_serialize">HttpQueryString::serialize()</a></li>
+<li><a href="#HttpQueryString_unserialize">HttpQueryString::unserialize()</a></li>
+<li><a href="#HttpQueryString_offsetGet">HttpQueryString::offsetGet()</a></li>
+<li><a href="#HttpQueryString_offsetSet">HttpQueryString::offsetSet()</a></li>
+<li><a href="#HttpQueryString_offsetExists">HttpQueryString::offsetExists()</a></li>
+<li><a href="#HttpQueryString_offsetUnset">HttpQueryString::offsetUnset()</a></li>
</li>
</ul>
</li>
<li><a href="#HttpRequest_setCookies">HttpRequest::setCookies()</a></li>
<li><a href="#HttpRequest_addCookies">HttpRequest::addCookies()</a></li>
<li><a href="#HttpRequest_getCookies">HttpRequest::getCookies()</a></li>
+<li><a href="#HttpRequest_enableCookies">HttpRequest::enableCookies()</a></li>
+<li><a href="#HttpRequest_resetCookies">HttpRequest::resetCookies()</a></li>
<li><a href="#HttpRequest_setUrl">HttpRequest::setUrl()</a></li>
<li><a href="#HttpRequest_getUrl">HttpRequest::getUrl()</a></li>
<li><a href="#HttpRequest_setMethod">HttpRequest::setMethod()</a></li>
<li><a href="#HttpRequest_getPostFiles">HttpRequest::getPostFiles()</a></li>
<li><a href="#HttpRequest_setPutFile">HttpRequest::setPutFile()</a></li>
<li><a href="#HttpRequest_getPutFile">HttpRequest::getPutFile()</a></li>
+<li><a href="#HttpRequest_setPutData">HttpRequest::setPutData()</a></li>
+<li><a href="#HttpRequest_addPutData">HttpRequest::addPutData()</a></li>
+<li><a href="#HttpRequest_getPutData">HttpRequest::getPutData()</a></li>
<li><a href="#HttpRequest_getResponseData">HttpRequest::getResponseData()</a></li>
<li><a href="#HttpRequest_getResponseHeader">HttpRequest::getResponseHeader()</a></li>
-<li><a href="#HttpRequest_getResponseCookie">HttpRequest::getResponseCookie()</a></li>
+<li><a href="#HttpRequest_getResponseCookies">HttpRequest::getResponseCookies()</a></li>
<li><a href="#HttpRequest_getResponseBody">HttpRequest::getResponseBody()</a></li>
<li><a href="#HttpRequest_getResponseCode">HttpRequest::getResponseCode()</a></li>
<li><a href="#HttpRequest_getResponseStatus">HttpRequest::getResponseStatus()</a></li>
</li>
</ul>
</div>
- <p><b>Generated at: Sat, 11 Feb 2006 15:09:37 +0100</b></p>
+ <p><b>Generated at: Fri, 07 Jul 2006 21:23:59 +0200</b></p>
</body>
</html>