X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=docs%2Ffunctions.html;h=164af4c00b2e784569423379e7dd8e31f811fcaa;hb=e2d31d8ae762ed3acb0ef5ec21edfcc94293dfaf;hp=7871ba15e6b549625a47cdd7b3f432de50b66448;hpb=60086d086e7f0dbfccf61931c1b2e2b410ccb5bb;p=m6w6%2Fext-http diff --git a/docs/functions.html b/docs/functions.html index 7871ba1..164af4c 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,18 @@ 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.
+string http_request(int method, string url[, string body[, array options[, array &info]]])
+Performs a custom HTTP request on the supplied url.
+Expects the first parameter to be an integer specifying the request method to use.
+
+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.
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 +572,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 HttpRuntimeException.
bool HttpMessage::send()
Send the Message according to its type as Response or Request.
@@ -581,9 +597,10 @@ should also contain any parent messages.
This provides limited functionality compared to HttpRequest and HttpResponse.Re-constructs the HttpMessage based upon the serialized string.
HttpMessage HttpMessage::detach(void)
Returns a clone of an HttpMessage object detached from any parent messages.
-void HttpMessage::prepend(HttpMessage message)
+void HttpMessage::prepend(HttpMessage message[, bool top = true])
Prepends message(s) to the HTTP message.
Expects an HttpMessage object as parameter.
+Throws HttpInvalidParamException if the message is located within the same message chain.
HttpMessage HttpMessage::reverse()
Reorders the message chain in reverse order.
Returns the most parent HttpMessage object.
@@ -600,7 +617,7 @@ should also contain any parent messages.
http_querystring_object.c
HttpQueryString
-void HttpQueryString::__construct([bool global = true[, mixed add])
+final void HttpQueryString::__construct([bool global = true[, mixed add])
Creates a new HttpQueryString object instance.
Operates on and modifies $_GET and $_SERVER['QUERY_STRING'] if global is TRUE.string HttpQueryString::toString()
@@ -613,8 +630,16 @@ Operates on and modifies $_GET and $_SERVER['QUERY_STRING'] if global is TRUE. "b" for bool, "i" for int, "f" for float, "s" for string, "a" for array and "o" for a stdClass object.string HttpQueryString::set(mixed params)
Set query string entry/entries. NULL values will unset the variable.
-HttpQueryString HttpQueryString::getInstance([bool global = true])
+static HttpQueryString HttpQueryString::singleton([bool global = true])
Get a single instance (differentiates between the global setting).
+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.
+string HttpQueryString::serialize()
+Implements Serializable.
+void HttpQueryString::unserialize(string serialized)
+Implements Serializable.
http_request_object.c
HttpRequest
@@ -769,6 +794,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
references the last received response. Use HttpMessage::getParentMessage()
@@ -820,7 +861,7 @@ references the last received response.
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.
@@ -949,6 +990,7 @@ parameter is unset no header with this name will be sent.Accepts a string as optional parameter which specifies the name of the
+
header to read. If the parameter is empty or omitted, an associative array
with all headers will be returned.NOTE: In Apache2 this only works for PHP-5.1.3 and greater.
Returns either a string containing the value of the header matching name,
FALSE on failure, or an associative array with all headers.static bool HttpResponse::setCache(bool cache)
@@ -1163,6 +1205,10 @@ http.cache_log is set.
Generated at: Fri, 17 Feb 2006 17:34:44 +0100
+Generated at: Thu, 06 Apr 2006 15:55:09 +0200