- curl grabs longs, so pass longs to curl_easy_setopt()
[m6w6/ext-http] / docs / functions.html
index e0d1e1c07131103a6cac648937d3137e87ae42e1..b27ed0799bae4709bf67515230a4092a77b61f5e 100644 (file)
@@ -74,7 +74,7 @@
 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 />
@@ -84,7 +84,7 @@ with the results as associative array like parse_url() would return.</p>
 <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 />
@@ -284,6 +284,8 @@ several consecutive HTTP messages.</p>
 <span style="color: #0000BB">&lt;?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">http_parse_cookie</span><span style="color: #007700">(</span><span style="color: #DD0000">"foo=bar;&nbsp;bar=baz;&nbsp;path=/;&nbsp;domain=example.com;&nbsp;comment=;&nbsp;secure"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;array(</span><span style="color: #DD0000">"comment"</span><span style="color: #007700">)));<br /><br /></span><span style="color: #0000BB">stdClass&nbsp;Object<br /></span><span style="color: #007700">(<br />&nbsp;&nbsp;&nbsp;&nbsp;[</span><span style="color: #0000BB">cookies</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;Array<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[</span><span style="color: #0000BB">foo</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">bar<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">[</span><span style="color: #0000BB">bar</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">baz<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">)<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;[</span><span style="color: #0000BB">extras</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;Array<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[</span><span style="color: #0000BB">comment</span><span style="color: #007700">]&nbsp;=&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;[</span><span style="color: #0000BB">flags</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">16<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">[</span><span style="color: #0000BB">expires</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</span><span style="color: #0000BB">0<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">[</span><span style="color: #0000BB">path</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;/<br />&nbsp;&nbsp;&nbsp;&nbsp;[</span><span style="color: #0000BB">domain</span><span style="color: #007700">]&nbsp;=&gt;&nbsp;</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">?&gt;</span><br />
 </span></code></blockquote></p>
 <p></pre></p>
+<h2 id="http_parse_params">object http_parse_params(string param)</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>
@@ -325,9 +327,8 @@ array where the following keys will be recognized:</p><pre> - redirect:
  - 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, accept (true) or reset (false) sessioncookies<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 />
@@ -476,6 +477,9 @@ all supported features.</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>
@@ -700,6 +704,16 @@ pairs to add.</p>
 <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>
@@ -1188,6 +1202,8 @@ http.cache_log is set.</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>
@@ -1245,6 +1261,7 @@ http.cache_log is set.</p>
 </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>
@@ -1318,6 +1335,8 @@ http.cache_log is set.</p>
 <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>
@@ -1415,7 +1434,7 @@ http.cache_log is set.</p>
 </li>
 </ul>
 </div>
-    <p><b>Generated at: Thu, 13 Apr 2006 17:25:58 +0200</b></p>
+    <p><b>Generated at: Thu, 25 May 2006 10:46:03 +0200</b></p>
 </body>
 </html>