the supported languages as array values.<br />
<br />
Example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br />$langs </span><span style="color: #007700">= array(<br /> </span><span style="color: #DD0000">'en-US'</span><span style="color: #007700">,</span><span style="color: #FF8000">// default<br /> </span><span style="color: #DD0000">'fr'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'fr-FR'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'de'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'de-DE'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'de-AT'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'de-CH'</span><span style="color: #007700">,<br />);<br />include </span><span style="color: #DD0000">'./langs/'</span><span style="color: #007700">. </span><span style="color: #0000BB">http_negotiate_language</span><span style="color: #007700">(</span><span style="color: #0000BB">$langs</span><span style="color: #007700">) .</span><span style="color: #DD0000">'.php'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?></span><br />
+<span style="color: #0000BB"><?php<br />$langs </span><span style="color: #007700">= array(<br /> </span><span style="color: #DD0000">'en-US'</span><span style="color: #007700">,</span><span style="color: #FF8000">// default<br /> </span><span style="color: #DD0000">'fr'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'fr-FR'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'de'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'de-DE'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'de-AT'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'de-CH'</span><span style="color: #007700">,<br />);<br />include </span><span style="color: #DD0000">'./langs/'</span><span style="color: #007700">. </span><span style="color: #0000BB">http_negotiate_language</span><span style="color: #007700">(</span><span style="color: #0000BB">$langs</span><span style="color: #007700">) .</span><span style="color: #DD0000">'.php'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?></span><br />
</span><br />
</code></blockquote><br />
<br />
the supported charsets as array values.<br />
<br />
Example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br />$charsets </span><span style="color: #007700">= array(<br /> </span><span style="color: #DD0000">'iso-8859-1'</span><span style="color: #007700">, </span><span style="color: #FF8000">// default<br /> </span><span style="color: #DD0000">'iso-8859-2'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'iso-8859-15'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'utf-8'<br /></span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$pref </span><span style="color: #007700">= </span><span style="color: #0000BB">http_negotiate_charset</span><span style="color: #007700">(</span><span style="color: #0000BB">$charsets</span><span style="color: #007700">);<br />if (!</span><span style="color: #0000BB">strcmp</span><span style="color: #007700">(</span><span style="color: #0000BB">$pref</span><span style="color: #007700">, </span><span style="color: #DD0000">'iso-8859-1'</span><span style="color: #007700">)) {<br /> </span><span style="color: #0000BB">iconv_set_encoding</span><span style="color: #007700">(</span><span style="color: #DD0000">'internal_encoding'</span><span style="color: #007700">, </span><span style="color: #DD0000">'iso-8859-1'</span><span style="color: #007700">);<br /> </span><span style="color: #0000BB">iconv_set_encoding</span><span style="color: #007700">(</span><span style="color: #DD0000">'output_encoding'</span><span style="color: #007700">, </span><span style="color: #0000BB">$pref</span><span style="color: #007700">);<br /> </span><span style="color: #0000BB">ob_start</span><span style="color: #007700">(</span><span style="color: #DD0000">'ob_iconv_handler'</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">?></span><br />
+<span style="color: #0000BB"><?php<br />$charsets </span><span style="color: #007700">= array(<br /> </span><span style="color: #DD0000">'iso-8859-1'</span><span style="color: #007700">, </span><span style="color: #FF8000">// default<br /> </span><span style="color: #DD0000">'iso-8859-2'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'iso-8859-15'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'utf-8'<br /></span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$pref </span><span style="color: #007700">= </span><span style="color: #0000BB">http_negotiate_charset</span><span style="color: #007700">(</span><span style="color: #0000BB">$charsets</span><span style="color: #007700">);<br />if (!</span><span style="color: #0000BB">strcmp</span><span style="color: #007700">(</span><span style="color: #0000BB">$pref</span><span style="color: #007700">, </span><span style="color: #DD0000">'iso-8859-1'</span><span style="color: #007700">)) {<br /> </span><span style="color: #0000BB">iconv_set_encoding</span><span style="color: #007700">(</span><span style="color: #DD0000">'internal_encoding'</span><span style="color: #007700">, </span><span style="color: #DD0000">'iso-8859-1'</span><span style="color: #007700">);<br /> </span><span style="color: #0000BB">iconv_set_encoding</span><span style="color: #007700">(</span><span style="color: #DD0000">'output_encoding'</span><span style="color: #007700">, </span><span style="color: #0000BB">$pref</span><span style="color: #007700">);<br /> </span><span style="color: #0000BB">ob_start</span><span style="color: #007700">(</span><span style="color: #DD0000">'ob_iconv_handler'</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">?></span><br />
</span><br />
</code></blockquote><br />
<br />
<p>Use with http_send() API.<br />
<br />
Example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br /></span><span style="color: #FF8000">// ~ 20 kbyte/s<br /># http_throttle(1, 20000);<br /># http_throttle(0.5, 10000);<br /># http_throttle(0.1, 2000);<br /></span><span style="color: #0000BB">http_send_file</span><span style="color: #007700">(</span><span style="color: #DD0000">'document.pdf'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span><br />
+<span style="color: #0000BB"><?php<br /></span><span style="color: #FF8000">// ~ 20 kbyte/s<br /># http_throttle(1, 20000);<br /># http_throttle(0.5, 10000);<br /># http_throttle(0.1, 2000);<br /></span><span style="color: #0000BB">http_send_file</span><span style="color: #007700">(</span><span style="color: #DD0000">'document.pdf'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span><br />
</span><br />
</code></blockquote><br />
<br />
<h2 id="http_chunked_decode">string http_chunked_decode(string encoded)</h2>
<p>This function decodes a string that was HTTP-chunked encoded.<br />
Returns false on failure.</p>
-<h2 id="http_split_response">array http_split_response(string http_response)</h2>
-<p>This function splits an HTTP response into an array with headers and the<br />
-content body. The returned array may look simliar to 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: #0000BB">0 </span><span style="color: #007700">=> array(<br /> </span><span style="color: #DD0000">'Response Status' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'200 Ok'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'Content-Type' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'text/plain'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'Content-Language' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'en-US'<br /> </span><span style="color: #007700">),<br /> </span><span style="color: #0000BB">1 </span><span style="color: #007700">=> </span><span style="color: #DD0000">"Hello World!"<br /></span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span><br />
+<h2 id="http_parse_message">object http_parse_message(string message)</h2>
+<p>Parses (a) http_message(s) into a simple recursive object structure:</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_message</span><span style="color: #007700">(</span><span style="color: #0000BB">http_get</span><span style="color: #007700">(</span><span style="color: #0000BB">URL</span><span style="color: #007700">, array(</span><span style="color: #DD0000">'redirect' </span><span style="color: #007700">=> </span><span style="color: #0000BB">3</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">type</span><span style="color: #007700">] => </span><span style="color: #0000BB">2<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">httpVersion</span><span style="color: #007700">] => </span><span style="color: #0000BB">1.1<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">responseCode</span><span style="color: #007700">] => </span><span style="color: #0000BB">200<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">headers</span><span style="color: #007700">] => Array <br /> (<br /> [</span><span style="color: #0000BB">Content</span><span style="color: #007700">-</span><span style="color: #0000BB">Length</span><span style="color: #007700">] => </span><span style="color: #0000BB">3<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">Server</span><span style="color: #007700">] => </span><span style="color: #0000BB">Apache<br /> </span><span style="color: #007700">)<br /> [</span><span style="color: #0000BB">body</span><span style="color: #007700">] => </span><span style="color: #0000BB">Hi</span><span style="color: #007700">!<br /> [</span><span style="color: #0000BB">parentMessage</span><span style="color: #007700">] => </span><span style="color: #0000BB">stdClass object<br /> </span><span style="color: #007700">(<br /> [</span><span style="color: #0000BB">type</span><span style="color: #007700">] => </span><span style="color: #0000BB">2<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">httpVersion</span><span style="color: #007700">] => </span><span style="color: #0000BB">1.1<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">responseCode</span><span style="color: #007700">] => </span><span style="color: #0000BB">302<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">headers</span><span style="color: #007700">] => Array <br /> (<br /> [</span><span style="color: #0000BB">Content</span><span style="color: #007700">-</span><span style="color: #0000BB">Length</span><span style="color: #007700">] => </span><span style="color: #0000BB">0<br /> </span><span style="color: #007700">[</span><span style="color: #0000BB">Location</span><span style="color: #007700">] => ...<br /> )<br /> [</span><span style="color: #0000BB">body</span><span style="color: #007700">] => <br /> [</span><span style="color: #0000BB">parentMessage</span><span style="color: #007700">] => ...<br /> )<br />)<br /></span><span style="color: #0000BB">?></span><br />
</span><br />
</code></blockquote><br />
<br />
- connecttimeout: int, seconds the connect may take<br />
- onprogress: mixed, progress callback</pre><p>The optional third parameter will be filled with some additional information<br />
in form af 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">'private' </span><span style="color: #007700">=> </span><span style="color: #DD0000">''</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://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><br />
</code></blockquote><br />
<br />
<p>Performs an HTTP HEAD request on the suppied url.<br />
Returns the HTTP response as string.<br />
See http_get() for a full list of available options.</p>
-<h2 id="http_post_data">string http_post_data(string url, string data[, array options[, &info]])</h2>
+<h2 id="http_post_data">string http_post_data(string url, string data[, array options[, array &info]])</h2>
<p>Performs an HTTP POST request, posting data.<br />
Returns the HTTP response as string.<br />
See http_get() for a full list of available options.</p>
<p>Check if a request method is registered (or available by default).</p>
<h2 id="http_request_method_name">string http_request_method_name(long method)</h2>
<p>Get the literal string representation of a standard or registered request method.</p>
-<h2 id="http_auth_basic">bool http_auth_basic(string user, string pass[, string realm = "Restricted"])</h2>
-<p>Example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br /></span><span style="color: #007700">if (!</span><span style="color: #0000BB">http_auth_basic</span><span style="color: #007700">(</span><span style="color: #DD0000">'mike'</span><span style="color: #007700">, </span><span style="color: #DD0000">'s3c|r3t'</span><span style="color: #007700">)) {<br /> die(</span><span style="color: #DD0000">'<h1>Authorization failed!</h1>'</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">?></span><br />
-</span><br />
-</code></blockquote><br />
-<br />
-</pre></p>
-<h2 id="http_auth_basic_cb">bool http_auth_basic_cb(mixed callback[, string realm = "Restricted"])</h2>
-<p>Example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">auth_cb</span><span style="color: #007700">(</span><span style="color: #0000BB">$user</span><span style="color: #007700">, </span><span style="color: #0000BB">$pass</span><span style="color: #007700">)<br />{<br /> global </span><span style="color: #0000BB">$db</span><span style="color: #007700">;<br /> </span><span style="color: #0000BB">$query </span><span style="color: #007700">= </span><span style="color: #DD0000">'SELECT pass FROM users WHERE user='</span><span style="color: #007700">. </span><span style="color: #0000BB">$db</span><span style="color: #007700">-></span><span style="color: #0000BB">quoteSmart</span><span style="color: #007700">(</span><span style="color: #0000BB">$user</span><span style="color: #007700">);<br /> if (</span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">$realpass </span><span style="color: #007700">= </span><span style="color: #0000BB">$db</span><span style="color: #007700">-></span><span style="color: #0000BB">getOne</span><span style="color: #007700">(</span><span style="color: #0000BB">$query</span><span style="color: #007700">)) {<br /> return </span><span style="color: #0000BB">$pass </span><span style="color: #007700">=== </span><span style="color: #0000BB">$realpass</span><span style="color: #007700">;<br /> }<br /> return </span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />}<br />if (!</span><span style="color: #0000BB">http_auth_basic_cb</span><span style="color: #007700">(</span><span style="color: #DD0000">'auth_cb'</span><span style="color: #007700">)) {<br /> die(</span><span style="color: #DD0000">'<h1>Authorization failed</h1>'</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">?></span><br />
-</span><br />
-</code></blockquote><br />
-<br />
-</pre></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>
<hr noshade>
and POST (including posting files) HTTP requests.</p>
<h3 id="HttpRequest___destruct">void HttpRequest::__destruct()</h3>
<p>Destroys the HttpRequest object.</p>
-<h3 id="HttpRequest_setOptions">bool HttpRequest::setOptions(array options)</h3>
+<h3 id="HttpRequest_setOptions">bool HttpRequest::setOptions([array options])</h3>
<p>Set the request options to use. See http_get() for a full list of available options.</p>
<h3 id="HttpRequest_getOptions">array HttpRequest::getOptions()</h3>
-<p>Get current set options.</p>
-<h3 id="HttpRequest_unsetOptions">void HttpRequest::unsetOptions()</h3>
-<p>Unset all options/headers/cookies.</p>
-<h3 id="HttpRequest_setSslOptions">bool HttpRequest::setSslOptions(array options)</h3>
+<p>Get currently set options.</p>
+<h3 id="HttpRequest_setSslOptions">bool HttpRequest::setSslOptions([array options])</h3>
+<p>Set SSL options.</p>
+<h3 id="HttpRequest_addSslOptions">bool HttpRequest::addSslOptions(array options)</h3>
<p>Set additional SSL options.</p>
<h3 id="HttpRequest_getSslOptions">array HttpRequest::getSslOtpions()</h3>
<p>Get previously set SSL options.</p>
-<h3 id="HttpRequest_unsetSslOptions">void HttpRequest::unsetSslOptions()</h3>
-<p>Unset previously set SSL options.</p>
<h3 id="HttpRequest_addHeaders">bool HttpRequest::addHeaders(array headers)</h3>
<p>Add request header name/value pairs.</p>
+<h3 id="HttpRequest_setHeaders">bool HttpRequest::setHeaders([array headers])</h3>
+<p>Set request header name/value pairs.</p>
<h3 id="HttpRequest_getHeaders">array HttpRequest::getHeaders()</h3>
<p>Get previously set request headers.</p>
-<h3 id="HttpRequest_unsetHeaders">void HttpRequest::unsetHeaders()</h3>
-<p>Unset previously set request headers.</p>
+<h3 id="HttpRequest_setCookies">bool HttpRequest::setCookies([array cookies])</h3>
+<p>Set cookies.</p>
<h3 id="HttpRequest_addCookies">bool HttpRequest::addCookies(array cookies)</h3>
<p>Add cookies.</p>
<h3 id="HttpRequest_getCookies">array HttpRequest::getCookies()</h3>
<p>Get previously set cookies.</p>
-<h3 id="HttpRequest_unsetCookies">void HttpRequest::unsetCookies()</h3>
-<p></p>
<h3 id="HttpRequest_setUrl">bool HttpRequest::setUrl(string url)</h3>
<p>Set the request URL.</p>
<h3 id="HttpRequest_getUrl">string HttpRequest::getUrl()</h3>
Use this only if you know what you're doing.</p>
<h3 id="HttpRequest_getContentType">string HttpRequest::getContentType()</h3>
<p>Get the previously content type.</p>
-<h3 id="HttpRequest_setQueryData">bool HttpRequest::setQueryData(mixed query_data)</h3>
+<h3 id="HttpRequest_setQueryData">bool HttpRequest::setQueryData([mixed query_data])</h3>
<p>Set the URL query parameters to use.<br />
Overwrites previously set query parameters.<br />
Affects any request types.</p>
<h3 id="HttpRequest_addQueryData">bool HttpRequest::addQueryData(array query_params)</h3>
<p>Add parameters to the query parameter list.<br />
Affects any request type.</p>
-<h3 id="HttpRequest_unsetQueryData">void HttpRequest::unsetQueryData()</h3>
-<p>Clean the query parameters.<br />
-Affects any request type.</p>
<h3 id="HttpRequest_addPostFields">bool HttpRequest::addPostFields(array post_data)</h3>
<p>Adds POST data entries.<br />
Affects only POST requests.</p>
-<h3 id="HttpRequest_setPostFields">bool HttpRequest::setPostFields(array post_data)</h3>
+<h3 id="HttpRequest_setPostFields">bool HttpRequest::setPostFields([array post_data])</h3>
<p>Set the POST data entries.<br />
Overwrites previously set POST data.<br />
Affects only POST requests.</p>
<h3 id="HttpRequest_getPostFields">array HttpRequest::getPostFields()</h3>
<p>Get previously set POST data.</p>
-<h3 id="HttpRequest_unsetPostFields">void HttpRequest::unsetPostFields()</h3>
-<p>Clean POST data entires.<br />
-Affects only POST requests.</p>
<h3 id="HttpRequest_addPostFile">bool HttpRequest::addPostFile(string name, string file[, string content_type = "application/x-octetstream"])</h3>
<p>Add a file to the POST request.<br />
Affects only POST requests.</p>
-<h3 id="HttpRequest_setPostFiles">bool HttpRequest::setPostFiles(array post_files)</h3>
+<h3 id="HttpRequest_setPostFiles">bool HttpRequest::setPostFiles([array post_files])</h3>
<p>Set files to post.<br />
Overwrites previously set post files.<br />
Affects only POST requests.</p>
<h3 id="HttpRequest_getPostFiles">array HttpRequest::getPostFiles()</h3>
<p>Get all previously added POST files.</p>
-<h3 id="HttpRequest_unsetPostFiles">void HttpRequest::unsetPostFiles()</h3>
-<p>Unset the POST files list.<br />
-Affects only POST requests.</p>
-<h3 id="HttpRequest_setPutFile">bool HttpRequest::SetPutFile(string file)</h3>
+<h3 id="HttpRequest_setPutFile">bool HttpRequest::setPutFile([string file])</h3>
<p>Set file to put.<br />
Affects only PUT requests.</p>
<h3 id="HttpRequest_getPutFile">string HttpRequest::getPutFile()</h3>
<p>Get previously set put file.</p>
-<h3 id="HttpRequest_unsetPutFile">void HttpRequest::unsetPutFile()</h3>
-<p>Unset file to put.<br />
-Affects only PUT requests.</p>
<h3 id="HttpRequest_getResponseData">array HttpRequest::getResponseData()</h3>
<p>Get all response data after the request has been sent.</p>
<h3 id="HttpRequest_getResponseHeader">mixed HttpRequest::getResponseHeader([string name])</h3>
<p>Get the full response as HttpMessage object.</p>
<h3 id="HttpRequest_getRequestMessage">HttpMessage HttpRequest::getRequestMessage()</h3>
<p>Get sent HTTP message.</p>
-<h3 id="HttpRequest_send">bool HttpRequest::send()</h3>
+<h3 id="HttpRequest_send">HttpMessage HttpRequest::send()</h3>
<p>Send the HTTP request.<br />
<br />
GET example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br />$r </span><span style="color: #007700">= new </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">, </span><span style="color: #0000BB">HTTP_GET</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">setOptions</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'lastmodified' </span><span style="color: #007700">=> </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">-></span><span style="color: #0000BB">addQueryData</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'category' </span><span style="color: #007700">=> </span><span style="color: #0000BB">3</span><span style="color: #007700">));<br />try {<br /> </span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">send</span><span style="color: #007700">();<br /> if (</span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseCode</span><span style="color: #007700">() == </span><span style="color: #0000BB">200</span><span style="color: #007700">) {<br /> </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">, </span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseBody</span><span style="color: #007700">());<br /> }<br />} catch (</span><span style="color: #0000BB">HttpException $ex</span><span style="color: #007700">) {<br /> echo </span><span style="color: #0000BB">$ex</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?></span><br />
+<span style="color: #0000BB"><?php<br />$r </span><span style="color: #007700">= new </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">, </span><span style="color: #0000BB">HTTP_GET</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">setOptions</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'lastmodified' </span><span style="color: #007700">=> </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">-></span><span style="color: #0000BB">addQueryData</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'category' </span><span style="color: #007700">=> </span><span style="color: #0000BB">3</span><span style="color: #007700">));<br />try {<br /> </span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">send</span><span style="color: #007700">();<br /> if (</span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseCode</span><span style="color: #007700">() == </span><span style="color: #0000BB">200</span><span style="color: #007700">) {<br /> </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">, </span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseBody</span><span style="color: #007700">());<br /> }<br />} catch (</span><span style="color: #0000BB">HttpException $ex</span><span style="color: #007700">) {<br /> echo </span><span style="color: #0000BB">$ex</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?></span><br />
</span><br />
</code></blockquote></pre><p>POST example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br />$r </span><span style="color: #007700">= new </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">, </span><span style="color: #0000BB">HTTP_POST</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">setOptions</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'cookies' </span><span style="color: #007700">=> array(</span><span style="color: #DD0000">'lang' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'de'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">addpostFields</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'user' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'mike'</span><span style="color: #007700">, </span><span style="color: #DD0000">'pass' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'s3c|r3t'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">addPostFile</span><span style="color: #007700">(</span><span style="color: #DD0000">'image'</span><span style="color: #007700">, </span><span style="color: #DD0000">'profile.jpg'</span><span style="color: #007700">, </span><span style="color: #DD0000">'image/jpeg'</span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">send</span><span style="color: #007700">()) {<br /> echo </span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseBody</span><span style="color: #007700">();<br />}<br /></span><span style="color: #0000BB">?></span><br />
+<span style="color: #0000BB"><?php<br />$r </span><span style="color: #007700">= new </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">, </span><span style="color: #0000BB">HTTP_POST</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">setOptions</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'cookies' </span><span style="color: #007700">=> array(</span><span style="color: #DD0000">'lang' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'de'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">addPostFields</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'user' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'mike'</span><span style="color: #007700">, </span><span style="color: #DD0000">'pass' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'s3c|r3t'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">addPostFile</span><span style="color: #007700">(</span><span style="color: #DD0000">'image'</span><span style="color: #007700">, </span><span style="color: #DD0000">'profile.jpg'</span><span style="color: #007700">, </span><span style="color: #DD0000">'image/jpeg'</span><span style="color: #007700">);<br />try {<br /> echo </span><span style="color: #0000BB">$r</span><span style="color: #007700">-></span><span style="color: #0000BB">send</span><span style="color: #007700">()-></span><span style="color: #0000BB">getBody</span><span style="color: #007700">();<br />} catch (</span><span style="color: #0000BB">HttpException $ex</span><span style="color: #007700">) {<br /> echo </span><span style="color: #0000BB">$ex</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?></span><br />
</span><br />
</code></blockquote><br />
<br />
able to send several HttpRequests in parallel.<br />
<br />
Example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br /></span><span style="color: #007700">try {<br /> </span><span style="color: #0000BB">$pool </span><span style="color: #007700">= new </span><span style="color: #0000BB">HttpRequestPool</span><span style="color: #007700">(<br /> new </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">, </span><span style="color: #0000BB">HTTP_HEAD</span><span style="color: #007700">),<br /> new </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">, </span><span style="color: #0000BB">HTTP_HEAD</span><span style="color: #007700">)<br /> );<br /> </span><span style="color: #0000BB">$pool</span><span style="color: #007700">-></span><span style="color: #0000BB">send</span><span style="color: #007700">();<br /> foreach(</span><span style="color: #0000BB">$pool </span><span style="color: #007700">as </span><span style="color: #0000BB">$request</span><span style="color: #007700">) {<br /> </span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"%s is %s (%d)\n"</span><span style="color: #007700">,<br /> </span><span style="color: #0000BB">$request</span><span style="color: #007700">-></span><span style="color: #0000BB">getUrl</span><span style="color: #007700">(),<br /> </span><span style="color: #0000BB">$request</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseCode</span><span style="color: #007700">() ? </span><span style="color: #DD0000">'alive' </span><span style="color: #007700">: </span><span style="color: #DD0000">'not alive'</span><span style="color: #007700">,<br /> </span><span style="color: #0000BB">$request</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseCode</span><span style="color: #007700">()<br /> );<br /> }<br />} catch (</span><span style="color: #0000BB">HttpException $e</span><span style="color: #007700">) {<br /> echo </span><span style="color: #0000BB">$e</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">try {<br /> </span><span style="color: #0000BB">$pool </span><span style="color: #007700">= new </span><span style="color: #0000BB">HttpRequestPool</span><span style="color: #007700">(<br /> new </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">, </span><span style="color: #0000BB">HTTP_HEAD</span><span style="color: #007700">),<br /> new </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">, </span><span style="color: #0000BB">HTTP_HEAD</span><span style="color: #007700">)<br /> );<br /> </span><span style="color: #0000BB">$pool</span><span style="color: #007700">-></span><span style="color: #0000BB">send</span><span style="color: #007700">();<br /> foreach(</span><span style="color: #0000BB">$pool </span><span style="color: #007700">as </span><span style="color: #0000BB">$request</span><span style="color: #007700">) {<br /> </span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"%s is %s (%d)\n"</span><span style="color: #007700">,<br /> </span><span style="color: #0000BB">$request</span><span style="color: #007700">-></span><span style="color: #0000BB">getUrl</span><span style="color: #007700">(),<br /> </span><span style="color: #0000BB">$request</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseCode</span><span style="color: #007700">() ? </span><span style="color: #DD0000">'alive' </span><span style="color: #007700">: </span><span style="color: #DD0000">'not alive'</span><span style="color: #007700">,<br /> </span><span style="color: #0000BB">$request</span><span style="color: #007700">-></span><span style="color: #0000BB">getResponseCode</span><span style="color: #007700">()<br /> );<br /> }<br />} catch (</span><span style="color: #0000BB">HttpException $e</span><span style="color: #007700">) {<br /> echo </span><span style="color: #0000BB">$e</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?></span><br />
</span><br />
</code></blockquote><br />
<br />
<p>Detach an HttpRequest object from this HttpRequestPool.</p>
<h3 id="HttpRequestPool_send">bool HttpRequestPool::send()</h3>
<p>Send all attached HttpRequest objects in parallel.</p>
-<h3 id="HttpRequestPool_socketSend">protected bool HttpRequestPool::socketSend()</h3>
+<h3 id="HttpRequestPool_socketPerform">protected bool HttpRequestPool::socketSend()</h3>
<p>Usage:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br /> </span><span style="color: #007700">while (</span><span style="color: #0000BB">$pool</span><span style="color: #007700">-></span><span style="color: #0000BB">socketSend</span><span style="color: #007700">()) {<br /> </span><span style="color: #0000BB">do_something_else</span><span style="color: #007700">();<br /> if (!</span><span style="color: #0000BB">$pool</span><span style="color: #007700">-></span><span style="color: #0000BB">socketSelect</span><span style="color: #007700">()) {<br /> die(</span><span style="color: #DD0000">'Socket error'</span><span style="color: #007700">);<br /> }<br /> }<br /> </span><span style="color: #0000BB">$pool</span><span style="color: #007700">-></span><span style="color: #0000BB">socketRead</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?></span><br />
+<span style="color: #0000BB"><?php<br /> </span><span style="color: #007700">while (</span><span style="color: #0000BB">$pool</span><span style="color: #007700">-></span><span style="color: #0000BB">socketPerform</span><span style="color: #007700">()) {<br /> </span><span style="color: #0000BB">do_something_else</span><span style="color: #007700">();<br /> if (!</span><span style="color: #0000BB">$pool</span><span style="color: #007700">-></span><span style="color: #0000BB">socketSelect</span><span style="color: #007700">()) {<br /> die(</span><span style="color: #DD0000">'Socket error'</span><span style="color: #007700">);<br /> }<br /> }<br /></span><span style="color: #0000BB">?></span><br />
</span><br />
</code></blockquote><br />
<br />
</pre></p>
<h3 id="HttpRequestPool_socketSelect">protected bool HttpRequestPool::socketSelect()</h3>
-<p>See HttpRequestPool::socketSend().</p>
-<h3 id="HttpRequestPool_socketRead">protected void HttpRequestPool::socketRead()</h3>
-<p>See HttpRequestPool::socketSend().</p>
+<p>See HttpRequestPool::socketPerform().</p>
<h3 id="HttpRequestPool_valid">bool HttpRequestPool::valid()</h3>
<p>Implements Iterator::valid().</p>
<h3 id="HttpRequestPool_current">HttpRequest HttpRequestPool::current()</h3>
<p>Implements Iterator::rewind().</p>
<hr noshade>
<h1>http_response_object.c</h1>
+<h3 id="HttpResponse_setHeader">static bool HttpResponse::setHeader(string name, mixed value[, bool replace = true)</h3>
+<p></p>
+<h3 id="HttpResponse_getHeader">static mixed HttpResponse::getHeader([string name])</h3>
+<p></p>
<h3 id="HttpResponse_setCache">static bool HttpResponse::setCache(bool cache)</h3>
<p>Whether it sould be attempted to cache the entitity.<br />
This will result in necessary caching headers and checks of clients<br />
<h3 id="HttpResponse_getCache">static bool HttpResponse::getCache()</h3>
<p>Get current caching setting.</p>
<h3 id="HttpResponse_setGzip">static bool HttpResponse::setGzip(bool gzip)</h3>
-<p>Enable on-thy-fly gzipping of the sent entity. NOT IMPLEMENTED YET.</p>
+<p>Enable on-thy-fly gzipping of the sent entity.</p>
<h3 id="HttpResponse_getGzip">static bool HttpResponse::getGzip()</h3>
<p>Get current gzipping setting.</p>
<h3 id="HttpResponse_setCacheControl">static bool HttpResponse::setCacheControl(string control[, long max_age = 0])</h3>
<h3 id="HttpResponse_setETag">static bool HttpResponse::setETag(string etag)</h3>
<p>Set a custom ETag. Use this only if you know what you're doing.</p>
<h3 id="HttpResponse_getETag">static string HttpResponse::getETag()</h3>
-<p>Get the previously set custom ETag.</p>
-<h3 id="HttpResponse_setThrottleDelay">static void HttpResponse::setThrottleDelay(double seconds)</h3>
+<p>Get calculated or previously set custom ETag.</p>
+<h3 id="HttpResponse_setLastModified">static bool HttpResponse::setLastModified(long timestamp)</h3>
+<p>Set a custom Last-Modified date.</p>
+<h3 id="HttpResponse_getLastModified">static HttpResponse::getLastModified()</h3>
+<p>Get calculated or previously set custom Last-Modified date.</p>
+<h3 id="HttpResponse_setThrottleDelay">static bool HttpResponse::setThrottleDelay(double seconds)</h3>
<p></p>
<h3 id="HttpResponse_getThrottleDelay">static double HttpResponse::getThrottleDelay()</h3>
<p></p>
-<h3 id="HttpResponse_setBufferSize">static void HttpResponse::setBufferSize(long bytes)</h3>
+<h3 id="HttpResponse_setBufferSize">static bool HttpResponse::setBufferSize(long bytes)</h3>
<p></p>
<h3 id="HttpResponse_getBufferSize">static long HttpResponse::getBufferSize()</h3>
<p></p>
<p>Finally send the entity.<br />
<br />
Example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br />HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">setCache</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">setContentType</span><span style="color: #007700">(</span><span style="color: #DD0000">'application/pdf'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">setContentDisposition</span><span style="color: #007700">(</span><span style="color: #DD0000">"$user.pdf"</span><span style="color: #007700">, </span><span style="color: #0000BB">false</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">setFile</span><span style="color: #007700">(</span><span style="color: #DD0000">'sheet.pdf'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">send</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?></span><br />
+<span style="color: #0000BB"><?php<br />HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">setCache</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">setContentType</span><span style="color: #007700">(</span><span style="color: #DD0000">'application/pdf'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">setContentDisposition</span><span style="color: #007700">(</span><span style="color: #DD0000">"$user.pdf"</span><span style="color: #007700">, </span><span style="color: #0000BB">false</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">setFile</span><span style="color: #007700">(</span><span style="color: #DD0000">'sheet.pdf'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">send</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?></span><br />
</span><br />
</code></blockquote><br />
<br />
<p>Capture script output.<br />
<br />
Example:</p><pre><blockquote><code><span style="color: #000000"><br />
-<span style="color: #0000BB"><?php<br />HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">setCache</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">capture</span><span style="color: #007700">();<br /></span><span style="color: #FF8000">// script follows<br /></span><span style="color: #0000BB">?></span><br />
+<span style="color: #0000BB"><?php<br />HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">setCache</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">capture</span><span style="color: #007700">();<br /></span><span style="color: #FF8000">// script follows<br />// note that you need to call<br /></span><span style="color: #0000BB">HttpResponse</span><span style="color: #007700">::</span><span style="color: #0000BB">send</span><span style="color: #007700">();<br /></span><span style="color: #FF8000">// at the end of the script unless <br />// you use PHP-5.1 or greater<br /></span><span style="color: #0000BB">?></span><br />
</span><br />
</code></blockquote><br />
<br />
</pre></p>
<hr noshade>
- <p><b>Generated at: Mon, 01 Aug 2005 09:46:36 +0200</b></p>
+ <p><b>Generated at: Fri, 26 Aug 2005 11:08:03 +0000</b></p>
</body>
</html>