X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Ffunctions.html;h=743a151fc7ad938c919560bdb374cfd19c912321;hb=accf1817e811a7edabd687ef6105983f39f13942;hp=2c1a469bc0887b074c4d6005e4c6c22c7e253ee9;hpb=24035853a9019d25c215eb63249de02a80675bcc;p=m6w6%2Fext-http diff --git a/docs/functions.html b/docs/functions.html index 2c1a469..743a151 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -198,19 +198,19 @@ requested last modification date is not between the calculated timespan,
the Last-Modified header is updated and the actual body will be sent.

Returns FALSE on failure, or *exits* with "304 Not Modified" if the entity is cached.

A log entry will be written to the cache log if the INI entry
-http.cache_log is set and the cache attempt was successful.

+http.log.cache is set and the cache attempt was successful.

bool http_cache_etag([string etag])

Attempts to cache the sent entity by its ETag, either supplied or generated
-by the hash algorithm specified by the INI setting "http.etag_mode".

+by the hash algorithm specified by the INI setting "http.etag.mode".

If the clients "If-None-Match" header matches the supplied/calculated
ETag, the body is considered cached on the clients side and
a "304 Not Modified" status code is issued.

Returns FALSE on failure, or *exits* with "304 Not Modified" if the entity is cached.

A log entry is written to the cache log if the INI entry
-"http.cache_log" is set and the cache attempt was successful.

+"http.log.cache" is set and the cache attempt was successful.

string ob_etaghandler(string data, int mode)

For use with ob_start(). Output buffer handler generating an ETag with
-the hash algorithm specified with the INI setting "http.etag_mode".

+the hash algorithm specified with the INI setting "http.etag.mode".

void http_throttle(double sec[, int bytes = 40960])

Sets the throttle delay and send buffer size for use with http_send() API.
Provides a basic throttling mechanism, which will yield the current process
@@ -243,7 +243,7 @@ if the client doesn't redirect immediately, and the request method was
another one than HEAD.

Returns FALSE on failure, or *exits* on success.

A log entry will be written to the redirect log, if the INI entry
-"http.redirect_log" is set and the redirect attempt was successful.

+"http.log.redirect" is set and the redirect attempt was successful.

bool http_send_data(string data)

Sends raw data with support for (multiple) range requests.

Returns TRUE on success, or FALSE on failure.

@@ -284,7 +284,7 @@ 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)

+

object http_parse_params(string param[, int flags = HTTP_PARAMS_DEFAULT])

Parse parameter list.

array http_get_request_headers(void)

Get a list of incoming HTTP headers.

@@ -327,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,
@@ -514,6 +513,9 @@ HTTP messages. Accepts an optional string parameter specifying the class to use

Set the body of the HttpMessage.
NOTE: Don't forget to update any headers accordingly.

Expects a string parameter containing the new body of the message.

+

string HttpMessage::getHeader(string header)

+

Get message header.

+

Returns the header value on success or NULL if the header does not exist.

array HttpMessage::getHeaders()

Get Message Headers.

Returns an associative array containing the messages HTTP headers.

@@ -577,6 +579,13 @@ HttpMessage::TYPE_REQUEST or supplied URL was empty.

Set the HTTP Protocol version of the Message.

Expects a string parameter containing the HTTP protocol version.

Returns TRUE on success, or FALSE if supplied version is out of range (1.0/1.1).

+

string HttpMessage::guessContentType(string magic_file[, int magic_mode = MAGIC_MIME])

+

Attempts to guess the content type of supplied payload through libmagic.

+

Expects a string parameter specifying the magic.mime database to use.
+Additionally accepts an optional int parameter, being flags for libmagic.

+

Returns the guessed content type on success, or FALSE on failure.

+

Throws HttpRuntimeException, HttpInvalidParamException
+if http.only_exceptions is TRUE.

HttpMessage HttpMessage::getParentMessage()

Get parent Message.

Returns the parent HttpMessage on success, or NULL if there's none.

@@ -638,6 +647,12 @@ Operates on and modifies $_GET and $_SERVER['QUERY_STRING'] if global is TRUE.

string HttpQueryString::set(mixed params)

Set query string entry/entries. NULL values will unset the variable.

+

HttpQueryString HttpQueryString::mod(mixed params)

+

Copies the query string object and sets provided params at the clone.
+This is basically shorthand for:


+<?php
$newQS 
= new HttpQueryString(false$oldQS);
$newQS->set($other_params);
?>
+

+

static HttpQueryString HttpQueryString::singleton([bool global = true])

Get a single instance (differentiates between the global setting).

bool HttpQueryString::xlate(string ie, string oe)

@@ -648,6 +663,14 @@ WARNING: Don't use any character set that can contain NUL bytes like UTF-16.

Implements Serializable.

void HttpQueryString::unserialize(string serialized)

Implements Serializable.

+

mixed HttpQueryString::offsetGet(string offset)

+

Implements ArrayAccess.

+

void HttpQueryString::offsetSet(string offset, mixed value)

+

Implements ArrayAccess.

+

bool HttpQueryString::offsetExists(string offset)

+

Implements ArrayAccess.

+

void HttpQueryString::offsetUnset(string offset)

+

Implements ArrayAccess.


http_request_object.c

HttpRequest

@@ -705,6 +728,16 @@ 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([bool session_only = FALSE])

+

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

+

Accepts an optional bool parameter specifying
+whether only session cookies should be reset
+(needs libcurl >= v7.15.4, else libcurl >= v7.14.1).

+

Returns TRUE on success, or FALSE on failure.

bool HttpRequest::setUrl(string url)

Set the request URL.

Expects a string as parameter specifying the request url.

@@ -1265,6 +1298,7 @@ http.cache_log is set.

  • HttpMessage::fromString()
  • HttpMessage::getBody()
  • HttpMessage::setBody()
  • +
  • HttpMessage::getHeader()
  • HttpMessage::getHeaders()
  • HttpMessage::setHeaders()
  • HttpMessage::addHeaders()
  • @@ -1280,6 +1314,7 @@ http.cache_log is set.

  • HttpMessage::setRequestUrl()
  • HttpMessage::getHttpVersion()
  • HttpMessage::setHttpVersion()
  • +
  • HttpMessage::guessContentType()
  • HttpMessage::getParentMessage()
  • HttpMessage::send()
  • HttpMessage::toString()
  • @@ -1305,10 +1340,15 @@ http.cache_log is set.

  • HttpQueryString::toArray()
  • HttpQueryString::get()
  • HttpQueryString::set()
  • +
  • HttpQueryString::mod()
  • HttpQueryString::singleton()
  • HttpQueryString::xlate()
  • HttpQueryString::serialize()
  • HttpQueryString::unserialize()
  • +
  • HttpQueryString::offsetGet()
  • +
  • HttpQueryString::offsetSet()
  • +
  • HttpQueryString::offsetExists()
  • +
  • HttpQueryString::offsetUnset()
  • @@ -1326,6 +1366,8 @@ http.cache_log is set.

  • HttpRequest::setCookies()
  • HttpRequest::addCookies()
  • HttpRequest::getCookies()
  • +
  • HttpRequest::enableCookies()
  • +
  • HttpRequest::resetCookies()
  • HttpRequest::setUrl()
  • HttpRequest::getUrl()
  • HttpRequest::setMethod()
  • @@ -1423,7 +1465,7 @@ http.cache_log is set.

    -

    Generated at: Fri, 19 May 2006 16:55:19 +0200

    +

    Generated at: Fri, 07 Jul 2006 21:23:59 +0200