X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Ffunctions.html;h=d1725a19ff9e28e7b9e8319fe45b14c32a701e9b;hb=dd199f9961262ed43fa544240df15a9d6d7d0f08;hp=164af4c00b2e784569423379e7dd8e31f811fcaa;hpb=cda14b5db045b18799f40f577e0e0afc5d6fcf14;p=m6w6%2Fext-http diff --git a/docs/functions.html b/docs/functions.html index 164af4c..d1725a1 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -74,7 +74,7 @@ looking like: "Wed, 22 Dec 2004 11:34:47 GMT"

Accepts an optional unix timestamp as parameter.

Returns the HTTP date as string.

-

string http_build_url(mixed url[, mixed parts[, int flags = HTTP_URL_REPLACE[, array &new_url]]])

+

string http_build_url([mixed url[, mixed parts[, int flags = HTTP_URL_REPLACE[, array &new_url]]]])

Build an URL.

Expexts (part(s) of) an URL as first parameter in form of a string or assoziative array
like parse_url() returns. Accepts an optional second parameter in the same way as the
@@ -84,7 +84,7 @@ with the results as associative array like parse_url() would return.

The parts of the second URL will be merged into the first according to the flags argument.
The following flags are recognized:

	- HTTP_URL_REPLACE:        (default) set parts of the second url will replace the parts in the first
- HTTP_URL_JOIN_PATH: the path of the second url will be merged into the one of the first
- - HTTP_URL_JOIN_QUERY: the two querystrings will be merged naivly; no replacements are done
+ - HTTP_URL_JOIN_QUERY: the two querystrings will be merged recursively
- HTTP_URL_STRIP_USER: the user part will not appear in the result
- HTTP_URL_STRIP_PASS: the password part will not appear in the result
- HTTP_URL_STRIP_AUTH: neither the user nor the password part will appear in the result
@@ -284,6 +284,8 @@ several consecutive HTTP messages.

<?php
print_r
(http_parse_cookie("foo=bar; bar=baz; path=/; domain=example.com; comment=; secure"0, array("comment")));

stdClass Object
(
    [
cookies] => Array
        (
            [
foo] => bar
            
[bar] => baz
        
)

    [
extras] => Array
        (
            [
comment] =>
        )

    [
flags] => 16
    
[expires] => 0
    
[path] => /
    [
domain] => example.com
)
?>

+

object http_parse_params(string param)

+

Parse parameter list.

array http_get_request_headers(void)

Get a list of incoming HTTP headers.

Returns an associative array of incoming request headers.

@@ -325,9 +327,8 @@ array where the following keys will be recognized:

 - redirect:
  - cookies:          array, list of cookies as associative array
like array("cookie" => "value")
- encodecookies: bool, whether to urlencode the cookies (default: true)
- - resetcookies: bool, wheter to reset the cookies
- cookiestore: string, path to a file where cookies are/will be stored
- - cookiesession: bool, accept (true) or reset (false) sessioncookies
+ - cookiesession: bool, don't load session cookies from cookiestore if TRUE
- resume: int, byte offset to start the download from;
if the server supports ranges
- range: array, array of arrays, each containing two integers,
@@ -402,6 +403,9 @@ See http_get() for a full list of available options.

Accepts an optional third string parameter containing the raw request body.
See http_get() for a full list of available options.

Returns the HTTP response(s) as string on success, or FALSE on failure.

+

string http_request_body_encode(array fields, array files)

+

Generate x-www-form-urlencoded resp. form-data encoded request body.

+

Returns encoded string on success, or FALSE on failure.

int http_request_method_register(string method)

Register a custom request method.

Expects a string parameter containing the request method name to register.

@@ -473,6 +477,9 @@ all supported features.


http_inflatestream_object.c

HttpInflateStream

+

void HttpInflateStream::__construct([int flags = 0])

+

Creates a new HttpInflateStream object instance.

+

Accepts an optional int parameter specifying how to initialize the inflate stream.

string HttpInflateStream::update(string data)

Passes more data through the inflate stream.

Expects a string parameter containing (a part of) the data to inflate.

@@ -697,6 +704,12 @@ pairs to add.

array HttpRequest::getCookies()

Get previously set cookies.

Returns an associative array containing any previously set cookies.

+

bool HttpRequest::enableCookies()

+

Enable automatic sending of received cookies.
+Note that cuutomly set cookies will be sent anyway.

+

bool HttpRequest::resetCookies()

+

Reset all automatically received/sent cookies.
+Note that customly set cookies are not affected.

bool HttpRequest::setUrl(string url)

Set the request URL.

Expects a string as parameter specifying the request url.

@@ -1185,6 +1198,8 @@ http.cache_log is set.

  • http_parse_cookie
  • +
  • http_parse_params +
  • http_get_request_headers
  • http_get_request_body @@ -1209,6 +1224,8 @@ http.cache_log is set.

  • http_request
  • +
  • http_request_body_encode +
  • http_request_method_register
  • http_request_method_unregister @@ -1240,6 +1257,7 @@ http.cache_log is set.

  • http_inflatestream_object.c -

    Generated at: Thu, 06 Apr 2006 15:55:09 +0200

    +

    Generated at: Mon, 22 May 2006 11:19:25 +0200