X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Ffunctions.html;h=2f7668eba3f34fa59899367cc1ff42e8f450232d;hb=2d31adababe7af92c0153f8eff813c582c3d566c;hp=02b48406b0cbcfd56f95dc0ab6bb3dd104e4d8f7;hpb=5bf21b22dcc28e60dca9dc4637520ee0cb9f565d;p=m6w6%2Fext-http diff --git a/docs/functions.html b/docs/functions.html index 02b4840..2f7668e 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -310,6 +310,7 @@ array where the following keys will be recognized:

 - redirect:
                      redirects to a different host
- proxyhost: string, proxy host in "host[:port]" format
- proxyport: int, use another proxy port as specified in proxyhost
+ - proxytype: int, HTTP_PROXY_HTTP, SOCKS4 or SOCKS5
- proxyauth: string, proxy credentials in "user:pass" format
- proxyauthtype: int, HTTP_AUTH_BASIC and/or HTTP_AUTH_NTLM
- httpauth: string, http credentials in "user:pass" format
@@ -329,6 +330,9 @@ array where the following keys will be recognized:

 - redirect:
  - cookiesession:    bool, accept (true) or reset (false) sessioncookies
- resume: int, byte offset to start the download from;
if the server supports ranges
+ - range: array, array of arrays, each containing two integers,
+ specifying the ranges to download if server support is
+ given; only recognized if the resume option is empty
- maxfilesize: int, maximum file size that should be downloaded;
has no effect, if the size of the requested entity is not known
- lastmodified: int, timestamp for If-(Un)Modified-Since header
@@ -386,7 +390,12 @@ See http_get() for a full list of available options.

Expects the second parameter to be a resource referencing an already
opened stream, from which the data to upload should be read.
See http_get() for a full list of available options.

-

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

+

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

+

string http_put_data(string url, string data[, array options[, array &info]])

+

Performs an HTTP PUT request on the supplied url.

+

Expects the second parameter to be a string containing the data to upload.
+See http_get() for a full list of available options.

+

Returns the HTTP response(s) as 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.

@@ -557,6 +566,7 @@ HttpMessage::TYPE_REQUEST or supplied URL was empty.

HttpMessage HttpMessage::getParentMessage()

Get parent Message.

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

+

Throws HttpMessageException.

bool HttpMessage::send()

Send the Message according to its type as Response or Request.
This provides limited functionality compared to HttpRequest and HttpResponse.

@@ -613,9 +623,9 @@ 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::getInstance([bool global = true])

+

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

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

-

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

+

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

Converts the query string from the source encoding ie to the target encoding oe.
WARNING: Don't use any character set that can contain NUL bytes like UTF-16.

Returns TRUE on success or FALSE on failure.

@@ -777,6 +787,22 @@ If the parameter is empty or omitted the put file will be unset.

string HttpRequest::getPutFile()

Get previously set put file.

Returns a string containing the path to the currently set put file.

+

bool HttpRequest::setPutData([string put_data])

+

Set PUT data to send, overwriting previously set PUT data.
+Affects only PUT requests.
+Only either PUT data or PUT file can be used for each request.
+PUT data has higher precedence and will be used even if a PUT
+file is set.

+

Accepts a string as parameter containing the data to upload.

+

Returns TRUE on success, or FALSE on failure.

+

bool HttpRequest::addPutData(string put_data)

+

Add PUT data, leaving previously set PUT data unchanged.
+Affects only PUT requests.

+

Expects a string as parameter containing the data to concatenate.

+

Returns TRUE on success, or FALSE on failure.

+

string HttpRequest::getPutData()

+

Get previously set PUT data.

+

Returns a string containing the currently set raw post data.

array HttpRequest::getResponseData()

Get all response data after the request has been sent.

Returns an associative array with the key "headers" containing an associative
@@ -828,7 +854,7 @@ references the last received response.

references the last received response. Use HttpMessage::getParentMessage()
to access the data of previously received responses within this request
cycle.

-

Throws HttpException.

+

Throws HttpException, HttpRuntimeException.

HttpMessage HttpRequest::getRequestMessage()

Get sent HTTP message.

Returns an HttpMessage object representing the sent request.

@@ -1171,6 +1197,8 @@ http.cache_log is set.

  • http_put_stream
  • +
  • http_put_data +
  • http_request_method_register
  • http_request_method_unregister @@ -1254,8 +1282,8 @@ http.cache_log is set.

  • HttpQueryString::toArray()
  • HttpQueryString::get()
  • HttpQueryString::set()
  • -
  • HttpQueryString::getInstance()
  • -
  • HttpQueryString::iconv()
  • +
  • HttpQueryString::singleton()
  • +
  • HttpQueryString::xlate()
  • HttpQueryString::serialize()
  • HttpQueryString::unserialize()
  • @@ -1295,6 +1323,9 @@ http.cache_log is set.

  • HttpRequest::getPostFiles()
  • HttpRequest::setPutFile()
  • HttpRequest::getPutFile()
  • +
  • HttpRequest::setPutData()
  • +
  • HttpRequest::addPutData()
  • +
  • HttpRequest::getPutData()
  • HttpRequest::getResponseData()
  • HttpRequest::getResponseHeader()
  • HttpRequest::getResponseCookies()
  • @@ -1369,7 +1400,7 @@ http.cache_log is set.

    -

    Generated at: Mon, 20 Feb 2006 17:41:32 +0100

    +

    Generated at: Tue, 07 Mar 2006 15:57:21 +0100