X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Ffunctions.html;h=1503d1a33ada8f096e9caa237a4bf1888c9d2d24;hb=537d2a421ee75ee8590c4c85e6ec1cd859b9810b;hp=2b0af4c13506ca317e4bd0f982371d64eb4b2e17;hpb=1fd7e6ceece2684e11cf9533e22dfb12a1b80f0e;p=m6w6%2Fext-http diff --git a/docs/functions.html b/docs/functions.html index 2b0af4c..1503d1a 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -1,6 +1,3 @@ -Content-type: text/html -X-Powered-By: PHP/5.0.1 -
This function returns a valid HTTP date regarding RFC 822/1123
+
Compose a valid HTTP date regarding RFC 822/1123
looking like: "Wed, 22 Dec 2004 11:34:47 GMT"
This function returns an absolute URI constructed from url.
-If the url is already abolute but a different proto was supplied,
+
Takes an optional unix timestamp as parameter.
+
+Returns the HTTP date as string.
Build a complete URI according to the supplied parameters.
+If the url is already abolute but a different proto was supplied,
only the proto part of the URI will be updated. If url has no
path specified, the path of the current REQUEST_URI will be taken.
The host will be taken either from the Host HTTP header of the client
the SERVER_NAME or just localhost if prior are not available.
-
-Some examples:
url = "page.php" => http://www.example.com/current/path/page.php-
- url = "/page.php" => http://www.example.com/page.php
- url = "/page.php", proto = "https" => https://www.example.com/page.php
-
Returns the absolute URI as string.
+Examples:
++
+<?php
$uri = http_build_uri("page.php", "https", NULL, 488);
?>
+
This function negotiates the clients preferred language based on its
-Accept-Language HTTP header. It returns the negotiated language or
-the default language if none match.
-
-The qualifier is recognized and languages without qualifier are rated highest.
-
-The supported parameter is expected to be an array having
-the supported languages as array values.
-
-Example:
-
-<?php
$langs = array(
'en-US',// default
'fr',
'fr-FR',
'de',
'de-DE',
'de-AT',
'de-CH',
);
include './langs/'. http_negotiate_language($langs) .'.php';
?>
-
-
-
-
Expects an array as parameter cotaining the supported languages as values.
+If the optional second parameter is supplied, it will be filled with an
+array containing the negotiation results.
Returns the negotiated language or the default language (i.e. first array entry)
+if none match.
Example:
++
+<?php
$langs = array(
'en-US',// default
'fr',
'fr-FR',
'de',
'de-DE',
'de-AT',
'de-CH',
);
include './langs/'. http_negotiate_language($langs, $result) .'.php';
print_r($result);
?>
+
This function negotiates the clients preferred charset based on its
-Accept-Charset HTTP header. It returns the negotiated charset or
-the default charset if none match.
-
-The qualifier is recognized and charset without qualifier are rated highest.
-
-The supported parameter is expected to be an array having
-the supported charsets as array values.
-
-Example:
+Accept-Charset HTTP header. The qualifier is recognized and charsets
-<?php
$charsets = array(
'iso-8859-1', // default
'iso-8859-2',
'iso-8859-15',
'utf-8'
);
$pref = http_negotiate_charset($charsets);
if (!strcmp($pref, 'iso-8859-1')) {
iconv_set_encoding('internal_encoding', 'iso-8859-1');
iconv_set_encoding('output_encoding', $pref);
ob_start('ob_iconv_handler');
}
?>
-
-
-
-
Expects an array as parameter cotaining the supported charsets as values.
+If the optional second parameter is supplied, it will be filled with an
+array containing the negotiation results.
Returns the negotiated charset or the default charset (i.e. first array entry)
+if none match.
Example:
+
+<?php
$charsets = array(
'iso-8859-1', // default
'iso-8859-2',
'iso-8859-15',
'utf-8'
);
$pref = http_negotiate_charset($charsets, $result);
if (strcmp($pref, 'iso-8859-1')) {
iconv_set_encoding('internal_encoding', 'iso-8859-1');
iconv_set_encoding('output_encoding', $pref);
ob_start('ob_iconv_handler');
}
print_r($result);
?>
+
Send HTTP status code.
+Expects an HTTP status code as parameter.
+Returns TRUE on success or FALSE on failure.
This converts the given timestamp to a valid HTTP date and
+
Send a "Last-Modified" header with a valid HTTP date.
+Accepts a unix timestamp, converts it to a valid HTTP date and
sends it as "Last-Modified" HTTP header. If timestamp is
-omitted, current time is sent.
Returns TRUE on success or FALSE on failure.
Sets the content type.
+Send the Content-Type of the sent entity. This is particularly important
+if you use the http_send() API.
Accepts an optional string parameter containing the desired content type
+(primary/secondary).
Returns TRUE on success or FALSE on failure.
Set the Content Disposition. The Content-Disposition header is very useful
+
Send the Content-Disposition. The Content-Disposition header is very useful
if the data actually sent came from a file or something similar, that should
be "saved" by the client/user (i.e. by browsers "Save as..." popup window).
Matches the given timestamp against the clients "If-Modified-Since" resp.
-"If-Unmodified-Since" HTTP headers.
This matches the given ETag against the clients
-"If-Match" resp. "If-None-Match" HTTP headers.
Expects a string parameter specifying the file name the "Save as..." dialogue
+should display. Optionally accepts a bool parameter, which, if set to true
+and the user agent knows how to handle the content type, will probably not
+cause the popup window to be shown.
Returns TRUE on success or FALSE on failure.
+Matches the given unix timestamp against the clients "If-Modified-Since"
+resp. "If-Unmodified-Since" HTTP headers.
Accepts a unix timestamp which should be matched. Optionally accepts an
+additional bool parameter, which if set to true will check the header
+usually used to validate HTTP ranges. If timestamp is omitted, the
+current time will be used.
Returns TRUE if timestamp represents an earlier date than the header,
+else FALSE.
Matches the given ETag against the clients "If-Match" resp.
+"If-None-Match" HTTP headers.
Expects a string parameter containing the ETag to compare. Optionally
+accepts a bool parameter, which, if set to true, will check the header
+usually used to validate HTTP ranges.
Retuns TRUE if ETag matches or the header contained the asterisk ("*"),
+else FALSE.
If timestamp_or_exires is greater than 0, it is handled as timestamp
+
Attempts to cache the sent entity by its last modification date.
+Accepts a unix timestamp as parameter which is handled as follows:
+If timestamp_or_expires is greater than 0, it is handled as timestamp
and will be sent as date of last modification. If it is 0 or omitted,
the current time will be sent as Last-Modified date. If it's negative,
it is handled as expiration time in seconds, which means that if the
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.
This function attempts to cache the HTTP body based on an ETag,
-either supplied or generated through calculation of the MD5
-checksum of the output (uses output buffering).
-
-If clients "If-None-Match" header matches the supplied/calculated
+
Attempts to cache the sent entity by its ETag, either supplied or generated
+by the hash algorythm 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.
For use with ob_start().
-Note that this has to be started as first output buffer.
-WARNING: Don't use with http_send_*().
Redirect to a given url.
-The supplied url will be expanded with http_absolute_uri(), the params array will
+
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.
For use with ob_start(). Output buffer handler generating an ETag with
+the hash algorythm specified with the INI setting "http.etag_mode".
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
+resp. thread until the entity has been completely sent, though.
Note: This doesn't really work with the FastCGI SAPI.
+Expects a double parameter specifying the seconds too sleep() after
+each chunk sent. Additionally accepts an optional int parameter
+representing the chunk size in bytes.
Example:
++
+<?php
// ~ 20 kbyte/s
# http_throttle(1, 20000);
# http_throttle(0.5, 10000);
# http_throttle(0.1, 2000);
http_send_file('document.pdf');
?>
+
Redirect to the given url.
+
+The supplied url will be expanded with http_build_uri(), the params array will
be treated with http_build_query() and the session identification will be appended
-if session is true.
-
-Depending on permanent the redirection will be issued with a permanent
-("301 Moved Permanently") or a temporary ("302 Found") redirection
-status code.
-
-To be RFC compliant, "Redirecting to URI." will be displayed,
-if the client doesn't redirect immediatly.
The HTTP response code will be set according to status.
+You can use one of the following constants for convenience:
+ - HTTP_REDIRECT 302 Found
+ - HTTP_REDIRECT_PERM 301 Moved Permanently
+ - HTTP_REDIRECT_POST 303 See Other
+ - HTTP_REDIRECT_TEMP 307 Temporary Redirect
Please see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3
+for which redirect response code to use in which situation.
To be RFC compliant, "Redirecting to URI." will be displayed,
+if the client doesn't redirect immediatly, 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.
Sends raw data with support for (multiple) range requests.
+Retursn TRUE on success, or FALSE on failure.
Sends a file with support for (multiple) range requests.
+Expects a string parameter referencing the file to send.
+Returns TRUE on success, or FALSE on failure.
Sends an already opened stream with support for (multiple) range requests.
+Expects a resource parameter referncing the stream to read from.
+Returns TRUE on success, or FALSE on failure.
This function decodes a string that was HTTP-chunked encoded.
-Returns false on failure.
This function splits an HTTP response into an array with headers and the
-content body. The returned array may look simliar to the following example:
+
-<?php
array(
0 => array(
'Status' => '200 Ok',
'Content-Type' => 'text/plain',
'Content-Language' => 'en-US'
),
1 => "Hello World!"
);
?>
-
-
-
-
Decodes a string that was HTTP-chunked encoded.
+Expects a chunked encoded string as parameter.
+Returns the decoded string on success or FALSE on failure.
+Parses (a) http_message(s) into a simple recursive object structure.
+Expects a string parameter containing a single HTTP message or
+several consecutive HTTP messages.
Returns an hierachical object structure of the parsed messages.
+Example:
+
+<?php
print_r(http_parse_message(http_get(URL, array('redirect' => 3)));
stdClass object
(
[type] => 2
[httpVersion] => 1.1
[responseCode] => 200
[headers] => Array
(
[Content-Length] => 3
[Server] => Apache
)
[body] => Hi!
[parentMessage] => stdClass object
(
[type] => 2
[httpVersion] => 1.1
[responseCode] => 302
[headers] => Array
(
[Content-Length] => 0
[Location] => ...
)
[body] =>
[parentMessage] => ...
)
)
?>
+
Parses HTTP headers into an associative array.
+Expects a string parameter containing HTTP headers.
+Returns an array on success, or FALSE on failure.
+Example:
+
+<?php
$headers = "content-type: text/html; charset=UTF-8\r\n".
"Server: Funky/1.0\r\n".
"Set-Cookie: foo=bar\r\n".
"Set-Cookie: baz=quux\r\n".
"Folded: works\r\n\ttoo\r\n";
print_r(http_parse_headers($headers));
Array
(
[Content-Type] => text/html; chatset=UTF-8
[Server] => Funky/1.0
[Set-Cookie] => Array
(
[0] => foo=bar
[1] => baz=quux
)
[Folded] => works
too
?>
+
Get a list of incoming HTTP headers.
+Returns an associative array of incoming request headers.
+Get the raw request body (e.g. POST or PUT data).
+Returns NULL when using the CLI SAPI.
+Match an incoming HTTP header.
+Expects two string parameters representing the header name (case-insensitive)
+and the header value that should be compared. The case sensitivity of the
+header value depends on the additional optional bool parameter accepted.
Returns TRUE if header value matches, else FALSE.
Performs an HTTP GET request on the supplied url.
-
-The second parameter is expected to be an associative
+
Performs an HTTP GET request on the supplied url.
+The second parameter, if set, is expected to be an associative
array where the following keys will be recognized:
- redirect: int, whether and how many redirects to follow
- unrestrictedauth: bool, whether to continue sending credentials on
redirects to a different host
@@ -189,188 +284,806 @@ array where the following keys will be recognized:- redirect: has no effect, if the size of the requested entity is not known
- lastmodified: int, timestamp for If-(Un)Modified-Since header
- timeout: int, seconds the request may take
- - connecttimeout: int, seconds the connect may takeThe optional third parameter will be filled with some additional information
-in form af an associative array, if supplied, like the following example:+
-<?php
array (
'effective_url' => 'http://localhost',
'response_code' => 403,
'total_time' => 0.017,
'namelookup_time' => 0.013,
'connect_time' => 0.014,
'pretransfer_time' => 0.014,
'size_upload' => 0,
'size_download' => 202,
'speed_download' => 11882,
'speed_upload' => 0,
'header_size' => 145,
'request_size' => 62,
'ssl_verifyresult' => 0,
'filetime' => -1,
'content_length_download' => 202,
'content_length_upload' => 0,
'starttransfer_time' => 0.017,
'content_type' => 'text/html; charset=iso-8859-1',
'redirect_time' => 0,
'redirect_count' => 0,
'private' => '',
'http_connectcode' => 0,
'httpauth_avail' => 0,
'proxyauth_avail' => 0,
)
?>
-
-
-
+ - connecttimeout: int, seconds the connect may take
+ - onprogress: mixed, progress callback
The optional third parameter will be filled with some additional information
+in form af an associative array, if supplied, like the following example:++
+<?php
array (
'effective_url' => 'http://localhost',
'response_code' => 403,
'total_time' => 0.017,
'namelookup_time' => 0.013,
'connect_time' => 0.014,
'pretransfer_time' => 0.014,
'size_upload' => 0,
'size_download' => 202,
'speed_download' => 11882,
'speed_upload' => 0,
'header_size' => 145,
'request_size' => 62,
'ssl_verifyresult' => 0,
'filetime' => -1,
'content_length_download' => 202,
'content_length_upload' => 0,
'starttransfer_time' => 0.017,
'content_type' => 'text/html; charset=iso-8859-1',
'redirect_time' => 0,
'redirect_count' => 0,
'http_connectcode' => 0,
'httpauth_avail' => 0,
'proxyauth_avail' => 0,
)
?>
+Returns the HTTP response(s) as string on success, or FALSE on failure.
string http_head(string url[, array options[, array &info]])
-Performs an HTTP HEAD request on the suppied url.
-
-Returns the HTTP response as string.
-See http_get() for a full list of available options.string http_post_data(string url, string data[, array options[, &info]])
-Performs an HTTP POST request, posting data.
-Returns the HTTP response as string.
+Performs an HTTP HEAD request on the supplied url.
+See http_get() for a full list of available parameters and options.
+Returns the HTTP response as string on success, or FALSE on failure.
+string http_post_data(string url, string data[, array options[, array &info]])
+Performs an HTTP POST requeston the supplied url.
+Expects a string as second parameter containing the pre-encoded post data.
+
+See http_get() for a full list of available parameters and options.
+
+Returns the HTTP response(s) as string on success, or FALSE on failure.string http_post_fields(string url, array data[, array files[, array options[, array &info]]])
+Performs an HTTP POST request on the supplied url.
+Expecrs an associative array as second parameter, which will be
+
+www-form-urlencoded. 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_put_file(string url, string file[, array options[, array &info]])
+Performs an HTTP PUT request on the supplied url.
+Expects the second parameter to be a string referncing the file to upload.
-
See http_get() for a full list of available options.string http_post_array(string url, array data[, array options[, array &info]])
-Performs an HTTP POST request, posting www-form-urlencoded array data.
-Returns the HTTP response as string.
+Returns the HTTP response(s) as string on success, or FALSE on failure.
+string http_put_stream(string url, resource stream[, array options[, array &info]])
+Performs an HTTP PUT request on the supplied url.
+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.bool http_auth_basic(string user, string pass[, string realm = "Restricted"])
-Example:
-
-<?php
if (!http_auth_basic('mike', 's3c|r3t')) {
die('<h1>Authorization failed!</h1>');
}
?>
-
-
-
-bool http_auth_basic_cb(mixed callback[, string realm = "Restricted"])
-Example:
-
-<?php
function auth_cb($user, $pass)
{
global $db;
$query = 'SELECT pass FROM users WHERE user='. $db->quoteSmart($user);
if (strlen($realpass = $db->getOne($query)) {
return $pass === $realpass;
}
return false;
}
if (!http_auth_basic_cb('auth_cb')) {
die('<h1>Authorization failed</h1>');
}
?>
-
-
-
-string http_build_query(mixed formdata [, string prefix])
+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.
+Returns the ID of the request method on success, or FALSE on failure.
+bool http_request_method_unregister(mixed method)
+Unregister a previously registered custom request method.
+Expects either the request method name or ID.
+Returns TRUE on success, or FALSE on failure.
+int http_request_method_exists(mixed method)
+Check if a request method is registered (or available by default).
+Expects either the request method name or ID as parameter.
+Returns TRUE if the request method is known, else FALSE.
+string http_request_method_name(int method)
+Get the literal string representation of a standard or registered request method.
+Expects the request method ID as parameter.
+Returns the request method name as string on success, or FALSE on failure.
+string http_build_query(mixed formdata [, string prefix[, string arg_separator]])
Generates a form-encoded query string from an associative array or object.
-http_methods.c
-void HTTPi_Response::__construct(bool cache, bool gzip)
-Instantiates a new HTTPi_Response object, which can be used to send
-
-any data/resource/file to an HTTP client with caching and multiple
-ranges/resuming support.
-
-NOTE: GZIPping is not implemented yet.bool HTTPi_Response::setCache(bool cache)
-Whether it sould be attempted to cache the entitity.
-
-This will result in necessary caching headers and checks of clients
-"If-Modified-Since" and "If-None-Match" headers. If one of those headers
-matches a "304 Not Modified" status code will be issued.
-
-NOTE: If you're using sessions, be shure that you set session.cache_limiter
-to something more appropriate than "no-cache"!bool HTTPi_Response::getCache()
-Get current caching setting.
-bool HTTPi_Response::setGzip(bool gzip)
-Enable on-thy-fly gzipping of the sent entity. NOT IMPLEMENTED YET.
-bool HTTPi_Response::getGzip()
-Get current gzipping setting.
-bool HTTPi_Response::setCacheControl(string control[, bool raw = false])
-Set a custom cache-control header, usually being "private" or "public"; if
-
-$raw is set to true the header will be sent as-is.string HTTPi_Response::getCacheControl()
-Get current Cache-Control header setting.
-bool HTTPi_Response::setContentType(string content_type)
-Set the content-type of the sent entity.
-string HTTPi_Response::getContentType()
-Get current Content-Type header setting.
-bool HTTPi_Response::setContentDisposition(string filename[, bool inline = false])
-Set the Content-Disposition of the sent entity. This setting aims to suggest
-
-the receiveing user agent how to handle the sent entity; usually the client
-will show the user a "Save As..." popup.array HTTPi_Response::getContentDisposition()
-Get current Content-Disposition setting.
-Will return an associative array like:array(-
- 'filename' => 'foo.bar',
- 'inline' => false
-)
-bool HTTPi_Response::setETag(string etag)
-Set a custom ETag. Use this only if you know what you're doing.
-string HTTPi_Response::getETag()
-Get the previously set custom ETag.
-bool HTTPi_Response::setData(string data)
-Set the data to be sent.
-string HTTPi_Response::getData()
-Get the previously set data to be sent.
-bool HTTPi_Response::setStream(resource stream)
-Set the resource to be sent.
-resource HTTPi_Response::getStream()
-Get the previously set resource to be sent.
-bool HTTPi_Response::setFile(string file)
-Set the file to be sent.
-string HTTPi_Response::getFile()
-Get the previously set file to be sent.
-bool HTTPi_Response::send()
-Finally send the entity.
-
-Example:-
-<?php
$r = new HTTPi_Response(true);
$r->setFile('../hidden/contract.pdf');
$r->setContentType('application/pdf');
$r->send();
?>
-
-
-
-void HTTPi_Request::__construct([string url[, long request_method = HTTP_GET]])
-Instantiate a new HTTPi_Request object which can be used to issue HEAD, GET
-
-and POST (including posting files) HTTP requests.void HTTPi_Request::__destruct()
-Destroys the HTTPi_Request object.
-bool HTTPi_Request::setOptions(array options)
+http_message_object.c
+HttpMessage
+void HttpMessage::__construct([string message])
+Instantiate a new HttpMessage object.
+Accepts an optional string parameter containing a single or several
+
+consecutive HTTP messages. The constructed object will actually
+represent the *last* message of the passed string. If there were
+prior messages, those can be accessed by HttpMessage::getParentMessage().Throws HttpMalformedHeaderException.
+static HttpMessage HttpMessage::fromString(string raw_message)
+Create an HttpMessage object from a string. Kind of a static constructor.
+Expects a string parameter containing a sinlge or several consecutive
+
+HTTP messages.Returns an HttpMessage object on success or NULL on failure.
+Throws HttpMalformedHeadersException.
+string HttpMessage::getBody()
+Get the body of the parsed HttpMessage.
+Returns the message body as string.
+void HttpMessage::setBody(string body)
+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.
+array HttpMessage::getHeaders()
+Get Message Headers.
+Returns an associative array containing the messages HTTP headers.
+void HttpMessage::setHeaders(array headers)
+Sets new headers.
+Expects an associative array as parameter containing the new HTTP headers,
+
+which will replace *all* previous HTTP headers of the message.void HttpMessage::addHeaders(array headers[, bool append = false])
+Add headers. If append is true, headers with the same name will be separated, else overwritten.
+Expects an associative array as parameter containing the additional HTTP headers
+
+to add to the messages existing headers. If the optional bool parameter is true,
+and a header with the same name of one to add exists already, this respective
+header will be converted to an array containing both header values, otherwise
+it will be overwritten with the new header value.int HttpMessage::getType()
+Get Message Type. (HTTP_MSG_NONE|HTTP_MSG_REQUEST|HTTP_MSG_RESPONSE)
+Returns the HttpMessage::TYPE.
+void HttpMessage::setType(int type)
+Set Message Type. (HTTP_MSG_NONE|HTTP_MSG_REQUEST|HTTP_MSG_RESPONSE)
+Exptects an int parameter, the HttpMessage::TYPE.
+int HttpMessage::getResponseCode()
+Get the Response Code of the Message.
+Returns the HTTP response code if the message is of type
+
+HttpMessage::TYPE_RESPONSE, else FALSE.bool HttpMessage::setResponseCode(int code)
+Set the response code of an HTTP Response Message.
+Expects an int parameter with the HTTP response code.
+Returns TRUE on success, or FALSE if the message is not of type
+
+HttpMessage::TYPE_RESPONSE or the response code is out of range (100-510).string HttpMessage::getRequestMethod()
+Get the Request Method of the Message.
+Returns the request method name on success, or FALSE if the message is
+
+not of type HttpMessage::TYPE_REQUEST.bool HttpMessage::setRequestMethod(string method)
+Set the Request Method of the HTTP Message.
+Expects a string parameter containing the request method name.
+Returns TRUE on success, or FALSE if the message is not of type
+
+HttpMessage::TYPE_REQUEST or an invalid request method was supplied.string HttpMessage::getRequestUri()
+Get the Request URI of the Message.
+Returns the request uri as string on success, or FALSE if the message
+
+is not of type HttpMessage::TYPE_REQUEST.bool HttpMessage::setRequestUri(string URI)
+Set the Request URI of the HTTP Message.
+Expects a string parameters containing the request uri.
+Returns TRUE on success, or FALSE if the message is not of type
+
+HttpMessage::TYPE_REQUEST or supplied URI was empty.string HttpMessage::getHttpVersion()
+Get the HTTP Protocol Version of the Message.
+Returns the HTTP protocol version as string.
+bool HttpMessage::setHttpVersion(string version)
+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).
+HttpMessage HttpMessage::getParentMessage()
+Get parent Message.
+Returns the parent HttpMessage on success, or NULL if there's none.
+bool HttpMessage::send()
+Send the Message according to its type as Response or Request.
+
+This provides limited functionality compared to HttpRequest and HttpResponse.Returns TRUE on success, or FALSE on failure.
+string HttpMessage::toString([bool include_parent = false])
+Get the string representation of the Message.
+Accepts a bool parameter which specifies whether the returned string
+
+should also contain any parent messages.Returns the full message as string.
+
+http_request_object.c
+HttpRequest
+void HttpRequest::__construct([string url[, int request_method = HTTP_METH_GET]])
+Instantiate a new HttpRequest object.
+Accepts a string as optional parameter containing the target request url.
+
+Additianally accepts an optional int parameter specifying the request method
+to use.Throws HttpException.
+void HttpRequest::__destruct()
+Destroys the HttpRequest object.
+bool HttpRequest::setOptions([array options])
Set the request options to use. See http_get() for a full list of available options.
-array HTTPi_Request::getOptions()
-Get current set options.
-bool HTTPi_Request::setURL(string url)
+Accepts an array as optional parameters, wich values will overwrite the
+
+currently set request options. If the parameter is empty or mitted,
+the optoions of the HttpRequest object will be reset.Returns TRUE on success, or FALSE on failure.
+array HttpRequest::getOptions()
+Get currently set options.
+Returns an associative array containing currently set options.
+bool HttpRequest::setSslOptions([array options])
+Set SSL options.
+Accepts an associative array as parameter containing any SSL specific options.
+
+If the parameter is empty or omitted, the SSL options will be reset.Returns TRUE on success, or FALSE on failure.
+bool HttpRequest::addSslOptions(array options)
+Set additional SSL options.
+Expects an associative array as parameter containing additional SSL specific options.
+Returns TRUE on success, or FALSE on failure.
+array HttpRequest::getSslOtpions()
+Get previously set SSL options.
+Returns an associative array containing any previously set SSL options.
+bool HttpRequest::addHeaders(array headers)
+Add request header name/value pairs.
+Expects an ssociative array as parameter containing additional header
+
+name/value pairs.Returns TRUE on success, or FALSE on failure.
+bool HttpRequest::setHeaders([array headers])
+Set request header name/value pairs.
+Accepts an associative array as parameter containing header name/value pairs.
+
+If the parameter is empty or omitted, all previously set headers will be unset.Returns TRUE on success, or FALSE on failure.
+array HttpRequest::getHeaders()
+Get previously set request headers.
+Returns an associative array containing all currently set headers.
+bool HttpRequest::setCookies([array cookies])
+Set cookies.
+Accepts an associative array as parameter containing cookie name/value pairs.
+
+If the parameter is empty or omitted, all previously set cookies will be unset.Returns TRUE on success, or FALSE on failure.
+bool HttpRequest::addCookies(array cookies)
+Add cookies.
+Expects an associative array as parameter containing any cookie name/value
+
+pairs to add.Returns TRUE on success, or FALSE on failure.
+array HttpRequest::getCookies()
+Get previously set cookies.
+Returns an associative array containing any previously set cookies.
+bool HttpRequest::setUrl(string url)
Set the request URL.
-string HTTPi_Request::getUrl()
+Expects a string as parameter specifying the request url.
+Returns TRUE on success, or FALSE on failure.
+string HttpRequest::getUrl()
Get the previously set request URL.
-bool HTTPi_Request::setMethod(long request_method)
-Set the request methods; one of the HTTP_HEAD, HTTP_GET or
-
-HTTP_POST constants.long HTTPi_Request::getMethod()
+Returns the currently set request url as string.
+bool HttpRequest::setMethod(int request_method)
+Set the request method.
+Expects an int as parameter specifying the request method to use.
+
+In PHP 5.1+ HttpRequest::METH, otherwise the HTTP_METH constants can be used.Returns TRUE on success, or FALSE on failure.
+int HttpRequest::getMethod()
Get the previously set request method.
-bool HTTPi_Request::setContentType(string content_type)
-Set the content type the post request should have.
-
-Use this only if you know what you're doing.string HTTPi_Request::getContentType()
+Returns the currently set request method.
+bool HttpRequest::setContentType(string content_type)
+Set the content type the post request should have.
+Expects a string as parameters containing the content type of the request
+
+(primary/secondary).Returns TRUE on success, or FALSE if the content type does not seem to
+
+contain a primary and a secondary part.string HttpRequest::getContentType()
Get the previously content type.
-bool HTTPi_Request::setQueryData(mixed query_data)
-Set the URL query parameters to use.
-Overwrites previously set query parameters.
+Returns the previously set content type as string.
+bool HttpRequest::setQueryData([mixed query_data])
+Set the URL query parameters to use, overwriting previously set query parameters.
-
Affects any request types.string HTTPi_Request::getQueryData()
+Accepts a string or associative array parameter containing the pre-encoded
+
+query string or to be encoded query fields. If the parameter is empty or
+omitted, the query data will be unset.Returns TRUE on success, or FALSE on failure.
+string HttpRequest::getQueryData()
Get the current query data in form of an urlencoded query string.
-bool HTTPi_Request::addQueryData(array query_params)
-Add parameters to the query parameter list.
-
-Affects any request type.void HTTPi_Request::unsetQueryData()
-Clean the query parameters.
+Returns a string containing the urlencoded query.
+bool HttpRequest::addQueryData(array query_params)
+Add parameters to the query parameter list, leaving previously set unchanged.
-
Affects any request type.bool HTTPi_Request::addPostData(array post_data)
-Adds POST data entries.
-
-Affects only POST requests.bool HTTPi_Request::setPostData(array post_data)
-Set the POST data entries.
-
-Overwrites previously set POST data.
-Affects only POST requests.array HTTPi_Request::getPostData()
+Expects an associative array as parameter containing the query fields to add.
+Returns TRUE on success, or FALSE on failure.
+bool HttpRequest::addPostFields(array post_data)
+Adds POST data entries, leaving previously set unchanged, unless a
+
+post entry with the same name already exists.
+Affects only POST and custom requests.Expects an associative array as parameter containing the post fields.
+Returns TRUE on success, or FALSE on failure.
+bool HttpRequest::setPostFields([array post_data])
+Set the POST data entries, overwriting previously set POST data.
+
+Affects only POST and custom requests.Accepts an associative array as parameter containing the post fields.
+
+If the parameter is empty or omitted, the post data will be unset.Returns TRUE on success, or FALSE on failure.
+array HttpRequest::getPostFields()
Get previously set POST data.
-void HTTPi_Request::unsetPostData()
-Clean POST data entires.
-
-Affects only POST requests.bool HTTPi_Request::addPostFile(string name, string file[, string content_type = "application/x-octetstream"])
-Add a file to the POST request.
-
-Affects only POST requests.array HTTPi_Request::getPostFiles()
+Returns the currently set post fields as associative array.
+bool HttpRequest::setRawPostData([string raw_post_data])
+Set raw post data to send, overwriting previously set raw post data. Don't
+
+forget to specify a content type. Affects only POST and custom requests.
+Only either post fields or raw post data can be used for each request.
+Raw post data has higher precedence and will be used even if post fields
+are set.Accepts a string as parameter containing the *raw* post data.
+Returns TRUE on success, or FALSE on failure.
+bool HttpRequest::addRawPostData(string raw_post_data)
+Add raw post data, leaving previously set raw post data unchanged.
+
+Affects only POST and custom requests.Expects a string as parameter containing the raw post data to concatenate.
+Returns TRUE on success, or FALSE on failure.
+string HttpRequest::getRawPostData()
+Get previously set raw post data.
+Returns a string containing the currently set raw post data.
+bool HttpRequest::addPostFile(string name, string file[, string content_type = "application/x-octetstream"])
+Add a file to the POST request, leaving prefiously set files unchanged.
+
+Affects only POST and custom requests. Cannot be used with raw post data.Expects a string parameter containing the form element name, and a string
+
+paremeter containing the path to the file which should be uploaded.
+Additionally accepts an optional string parameter which chould contain
+the content type of the file.Returns TRUE on success, or FALSE if the content type seems not to contain a
+
+primary and a secondary content type part.bool HttpRequest::setPostFiles([array post_files])
+Set files to post, overwriting previously set post files.
+
+Affects only POST and requests. Cannot be used with raw post data.Accepts an array containing the files to post. Each entry should be an
+
+associative array with "name", "file" and "type" keys. If the parameter
+is empty or omitted the post files will be unset.Returns TRUE on success, or FALSE on failure.
+array HttpRequest::getPostFiles()
Get all previously added POST files.
-void HTTPi_Request::unsetPostFiles()
-Unset the POST files list.
-
-Affects only POST requests.array HTTPi_Request::getResponseData()
+Returns an array containing currently set post files.
+bool HttpRequest::setPutFile([string file])
+Set file to put. Affects only PUT requests.
+Accepts a string as parameter referencing the path to file.
+
+If the parameter is empty or omitted the put file will be unset.Returns TRUE on success, or FALSE on failure.
+string HttpRequest::getPutFile()
+Get previously set put file.
+Returns a string containing the path to the currently set put file.
+array HttpRequest::getResponseData()
Get all response data after the request has been sent.
-string HTTPi_Request::getResponseHeader([string name])
+Returns an associative array with the key "headers" containing an associative
+
+array holding all response headers, as well as the ley "body" containing a
+string with the response body.If redirects were allowed and several responses were received, the data
+
+references the last received response.mixed HttpRequest::getResponseHeader([string name])
Get response header(s) after the request has been sent.
-string HTTPi_Request::getResponseBody()
+Accepts an string as optional parameter specifying a certain header to read.
+
+If the parameter is empty or omitted all response headers will be returned.Returns either a string with the value of the header matching name if requested,
+
+FALSE on failure, or an associative array containing all reponse headers.If redirects were allowed and several responses were received, the data
+
+references the last received response.array HttpRequest::getResponseCookie([string name])
+Get response cookie(s) after the request has been sent.
+Accepts a string as optional parameter specifying the name of the cookie to read.
+
+If the parameter is empty or omitted, an associative array with all received
+cookies will be returned.Returns either an associative array with the cookie's name, value and any
+
+additional params of the cookie matching name if requested, FALSE on failure,
+or an array containing all received cookies as arrays.If redirects were allowed and several responses were received, the data
+
+references the last received response.string HttpRequest::getResponseBody()
Get the response body after the request has been sent.
-int HTTPi_Request::getResponseCode()
+Returns a string containing the response body.
+If redirects were allowed and several responses were received, the data
+
+references the last received response.int HttpRequest::getResponseCode()
Get the response code after the request has been sent.
-array HTTPi_Request::getResponseInfo([string name])
+Returns an int representing the response code.
+If redirects were allowed and several responses were received, the data
+
+references the last received response.mixed HttpRequest::getResponseInfo([string name])
Get response info after the request has been sent.
-
See http_get() for a full list of returned info.bool HTTPi_Request::send()
-Send the HTTP request.
-
-GET example:
-<?php
$r = new HTTPi_Request('http://example.com/feed.rss', HTTP_GET);
$r->setOptions(array('lastmodified' => filemtime('local.rss')));
$r->addQueryData(array('category' => 3));
if ($r->send() && $r->getResponseCode() == 200) {
file_put_contents('local.rss', $r->getResponseBody());
}
?>
-
-POST example:
+
-<?php
$r = new HTTPi_Request('http://example.com/form.php', HTTP_POST);
$r->setOptions(array('cookies' => array('lang' => 'de')));
$r->addPostData(array('user' => 'mike', 'pass' => 's3c|r3t'));
$r->addPostFile('image', 'profile.jpg', 'image/jpeg');
if ($r->send()) {
echo $r->getResponseBody();
}
?>
-
-
-
-Accepts a string as optional parameter specifying the info to read.
+
+If the parameter is empty or omitted, an associative array containing
+all available info will be returned.Returns either a scalar containing the value of the info matching name if
+
+requested, FALSE on failure, or an associative array containing all
+available info.If redirects were allowed and several responses were received, the data
+
+references the last received response.HttpMessage HttpRequest::getResponseMessage()
+Get the full response as HttpMessage object after the request has been sent.
+Returns an HttpMessage object of the response.
+If redirects were allowed and several responses were received, the data
+
+references the last received response. Use HttpMessage::getParentMessage()
+to access the data of previously received responses whithin this request
+cycle.Throws HttpException.
+HttpMessage HttpRequest::getRequestMessage()
+Get sent HTTP message.
+Returns an HttpMessage object representing the sent request.
+If redirects were allowed and several responses were received, the data
+
+references the last received response. Use HttpMessage::getParentMessage()
+to access the data of previously sent requests whithin this request
+cycle.HttpMessage HttpRequest::getHistory()
+Get all sent requests and received responses as an HttpMessage object.
+If you don't want to record history at all, set the instance variable
+
+HttpRequest::$recoedHistory to FALSE.Returns an HttpMessage object representing the complete request/response
+
+history.The object references the last received response, use HttpMessage::getParentMessage()
+
+to access the data of previously sent requests and received responses.Throws HttpMalformedHeaderException.
+void HttpRequest::clearHistory()
+Clear the history.
+HttpMessage HttpRequest::send()
+Send the HTTP request.
+Returns the received response as HttpMessage object.
+Throws HttpRuntimeException, HttpRequestException,
+
+HttpMalformedHeaderException, HttpEncodingException.GET example:
++
+<?php
$r = new HttpRequest('http://example.com/feed.rss', HTTP_GET);
$r->setOptions(array('lastmodified' => filemtime('local.rss')));
$r->addQueryData(array('category' => 3));
try {
$r->send();
if ($r->getResponseCode() == 200) {
file_put_contents('local.rss', $r->getResponseBody());
}
} catch (HttpException $ex) {
echo $ex;
}
?>
+POST example:
++
+<?php
$r = new HttpRequest('http://example.com/form.php', HTTP_POST);
$r->setOptions(array('cookies' => array('lang' => 'de')));
$r->addPostFields(array('user' => 'mike', 'pass' => 's3c|r3t'));
$r->addPostFile('image', 'profile.jpg', 'image/jpeg');
try {
echo $r->send()->getBody();
} catch (HttpException $ex) {
echo $ex;
}
?>
+
+http_requestpool_object.c
+HttpRequestPool
+void HttpRequestPool::__construct([HttpRequest request[, ...]])
+Instantiate a new HttpRequestPool object. An HttpRequestPool is
+
+able to send several HttpRequests in parallel.WARNING: Don't attach/detach HttpRequest objects to the HttpRequestPool
+
+object while you're using the implemented Interator interface.Accepts virtual infinite optional parameters each referencing an
+
+HttpRequest object.Throws HttpRequestException, HttpRequestPoolException, HttpInvalidParamException.
+Example:
++
+<?php
try {
$pool = new HttpRequestPool(
new HttpRequest('http://www.google.com/', HttpRequest::METH_HEAD),
new HttpRequest('http://www.php.net/', HttpRequest::METH_HEAD)
);
$pool->send();
foreach($pool as $request) {
printf("%s is %s (%d)\n",
$request->getUrl(),
$request->getResponseCode() ? 'alive' : 'not alive',
$request->getResponseCode()
);
}
} catch (HttpException $e) {
echo $e;
}
?>
+void HttpRequestPool::__destruct()
+Clean up HttpRequestPool object.
+void HttpRequestPool::reset()
+Detach all attached HttpRequest objects.
+bool HttpRequestPool::attach(HttpRequest request)
+Attach an HttpRequest object to this HttpRequestPool.
+
+WARNING: set all options prior attaching!Expects the parameter to be an HttpRequest object not alread attached to
+
+antother HttpRequestPool object.Returns TRUE on success, or FALSE on failure.
+Throws HttpInvalidParamException, HttpRequestException,
+
+HttpRequestPoolException, HttpEncodingException.bool HttpRequestPool::detach(HttpRequest request)
+Detach an HttpRequest object from this HttpRequestPool.
+Expects the parameter to be an HttpRequest object attached to this
+
+HttpRequestPool object.Returns TRUE on success, or FALSE on failure.
+Throws HttpInvalidParamException, HttpRequestPoolException.
+bool HttpRequestPool::send()
+Send all attached HttpRequest objects in parallel.
+Returns TRUE on success, or FALSE on failure.
+Throws HttpSocketException, HttpRequestException,
+
+HttpRequestPoolException, HttpMalformedHeaderException.protected bool HttpRequestPool::socketPerform()
+Returns TRUE until each request has finished its transaction.
+Usage:
++
+<?php
while ($pool->socketPerform()) {
do_something_else();
if (!$pool->socketSelect()) {
die('Socket error');
}
}
?>
+protected bool HttpRequestPool::socketSelect()
+See HttpRequestPool::socketPerform().
+Returns TRUE on success, or FALSE on failure.
+bool HttpRequestPool::valid()
+Implements Iterator::valid().
+HttpRequest HttpRequestPool::current()
+Implements Iterator::current().
+int HttpRequestPool::key()
+Implements Iterator::key().
+void HttpRequestPool::next()
+Implements Iterator::next().
+void HttpRequestPool::rewind()
+Implements Iterator::rewind().
+
+http_response_object.c
+static bool HttpResponse::setHeader(string name, mixed value[, bool replace = true])
+Send an HTTP header.
+Expects a string parameter containing the name of the header and a mixed
+
+parameter containing the value of the header, which will be converted to
+a string. Additionally accepts an optional boolean parameter, which
+specifies whether an existing header should be replaced. If the second
+parameter is unset no header with this name will be sent.Returns TRUE on success, or FALSE on failure.
+Throws HttpHeaderException if http.only_exceptions is TRUE.
+static mixed HttpResponse::getHeader([string name])
+Get header(s) about to 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.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)
+Whether it sould be attempted to cache the entitity.
+
+This will result in necessary caching headers and checks of clients
+"If-Modified-Since" and "If-None-Match" headers. If one of those headers
+matches a "304 Not Modified" status code will be issued.NOTE: If you're using sessions, be shure that you set session.cache_limiter
+
+to something more appropriate than "no-cache"!Expects a boolean as parameter specifying whether caching should be attempted.
+Returns TRUE ons success, or FALSE on failure.
+static bool HttpResponse::getCache()
+Get current caching setting.
+Returns TRUE if caching should be attempted, else FALSE.
+static bool HttpResponse::setGzip(bool gzip)
+Enable on-thy-fly gzipping of the sent entity.
+Expects a boolean as parameter indicating if GZip compression should be enabled.
+Returns TRUE on success, or FALSE on failure.
+static bool HttpResponse::getGzip()
+Get current gzipping setting.
+Returns TRUE if GZip compression is enabled, else FALSE.
+static bool HttpResponse::setCacheControl(string control[, int max_age = 0])
+Set a custom cache-control header, usually being "private" or "public";
+
+The max_age parameter controls how long the cache entry is valid on the client side.Expects a string parameter containing the primary cache control setting.
+
+Addtitionally accepts an int parameter specifying the max-age setting.Returns TRUE on success, or FALSE if control does not match one of
+
+"public" , "private" or "no-cache".Throws HttpInvalidParamException if http.only_exceptions is TRUE.
+static string HttpResponse::getCacheControl()
+Get current Cache-Control header setting.
+Returns the current cache control setting as a string like sent in a header.
+static bool HttpResponse::setContentType(string content_type)
+Set the content-type of the sent entity.
+Expects a string as parameter specifying the content type of the sent entity.
+Returns TRUE on success, or FALSE if the content type does not seem to
+
+contain a primary and secondary content type part.Throws HttpInvalidParamException if http.only_exceptions is TRUE.
+static string HttpResponse::getContentType()
+Get current Content-Type header setting.
+Returns the currently set content type as string.
+static string HttpResponse::guessContentType(string magic_file[, int magic_mode = MAGIC_MIME])
+Attempts to guess the content type of supplied payload through libmagic.
+
+If the attempt is successful, the guessed content type will automatically
+be set as response content type.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.static bool HttpResponse::setContentDisposition(string filename[, bool inline = false])
+Set the Content-Disposition. The Content-Disposition header is very useful
+
+if the data actually sent came from a file or something similar, that should
+be "saved" by the client/user (i.e. by browsers "Save as..." popup window).Expects a string parameter specifying the file name the "Save as..." dialogue
+
+should display. Optionally accepts a bool parameter, which, if set to true
+and the user agent knows how to handle the content type, will probably not
+cause the popup window to be shown.Returns TRUE on success or FALSE on failure.
+static string HttpResponse::getContentDisposition()
+Get current Content-Disposition setting.
+Returns the current content disposition as string like sent in a header.
+static bool HttpResponse::setETag(string etag)
+Set a custom ETag. Use this only if you know what you're doing.
+Expects an unquoted string as parameter containing the ETag.
+Returns TRUE on success, or FALSE on failure.
+static string HttpResponse::getETag()
+Get calculated or previously set custom ETag.
+Returns the calculated or previously set ETag as unquoted string.
+static bool HttpResponse::setLastModified(int timestamp)
+Set a custom Last-Modified date.
+Expects an unix timestamp as parameter representing the last modification
+
+time of the sent entity.Returns TRUE on success, or FALSE on failure.
+static int HttpResponse::getLastModified()
+Get calculated or previously set custom Last-Modified date.
+Returns the calculated or previously set unix timestamp.
+static bool HttpResponse::setThrottleDelay(double seconds)
+Sets the throttle delay for use with HttpResponse::setBufferSize().
+Provides a basic throttling mechanism, which will yield the current process
+
+resp. thread until the entity has been completely sent, though.Note: This doesn't really work with the FastCGI SAPI.
+Expects a double parameter specifying the seconds too sleep() after
+
+each chunk sent.Returns TRUE on success, or FALSE on failure.
+static double HttpResponse::getThrottleDelay()
+Get the current throttle delay.
+Returns a double representing the throttle delay in seconds.
+static bool HttpResponse::setBufferSize(int bytes)
+Sets the send buffer size for use with HttpResponse::setThrottleDelay().
+Provides a basic throttling mechanism, which will yield the current process
+
+resp. thread until the entity has been completely sent, though.Note: This doesn't really work with the FastCGI SAPI.
+Expects an int parameter representing the chunk size in bytes.
+Returns TRUE on success, or FALSE on failure.
+static int HttpResponse::getBufferSize()
+Get current buffer size.
+Returns an int representing the current buffer size in bytes.
+static bool HttpResponse::setData(mixed data)
+Set the data to be sent.
+Expects one parameter, which will be converted to a string and contains
+
+the data to send.Returns TRUE on success, or FALSE on failure.
+static string HttpResponse::getData()
+Get the previously set data to be sent.
+Returns a string containing the previously set data to send.
+static bool HttpResponse::setStream(resource stream)
+Set the resource to be sent.
+Expects a resource parameter referencing an already opened stream from
+
+which the data to send will be read.Returns TRUE on success, or FALSE on failure.
+static resource HttpResponse::getStream()
+Get the previously set resource to be sent.
+Returns the previously set resource.
+static bool HttpResponse::setFile(string file)
+Set the file to be sent.
+Expects a string as parameter, specifying the path to the file to send.
+Returns TRUE on success, or FALSE on failure.
+static string HttpResponse::getFile()
+Get the previously set file to be sent.
+Returns the previously set path to the file to send as string.
+static bool HttpResponse::send([bool clean_ob = true])
+Finally send the entity.
+Accepts an optional boolean parameter, specifying wheter the ouput
+
+buffers should be discarded prior sending. A successful caching attempt
+will cause a script termination, and write a log entry if the INI setting
+http.cache_log is set.Returns TRUE on success, or FALSE on failure.
+Throws HttpHeaderException, HttpResponseException if http.onyl_excpetions is TRUE.
+Example:
++
+<?php
HttpResponse::setCache(true);
HttpResponse::setContentType('application/pdf');
HttpResponse::setContentDisposition("$user.pdf", false);
HttpResponse::setFile('sheet.pdf');
HttpResponse::send();
?>
+static void HttpResponse::capture()
+Capture script output.
+Example:
+
+<?php
HttpResponse::setCache(true);
HttpResponse::capture();
// script follows
?>
+
-Generated at: Mon, 7 Mar 2005 14:09:33 +0100
+Table of Contents +++
+ +- http_functions.c +
++
+- http_date +
+- http_build_uri +
+- http_negotiate_language +
+- http_negotiate_charset +
+- http_send_status +
+- http_send_last_modified +
+- http_send_content_type +
+- http_send_content_disposition +
+- http_match_modified +
+- http_match_etag +
+- http_cache_last_modified +
+- http_cache_etag +
+- ob_etaghandler +
+- http_throttle +
+- http_redirect +
+- http_send_data +
+- http_send_file +
+- http_send_stream +
+- http_chunked_decode +
+- http_parse_message +
+- http_parse_headers +
+- http_get_request_headers +
+- http_get_request_body +
+- http_match_request_header +
+- http_get +
+- http_head +
+- http_post_data +
+- http_post_fields +
+- http_put_file +
+- http_put_stream +
+- http_request_method_register +
+- http_request_method_unregister +
+- http_request_method_exists +
+- http_request_method_name +
+- http_build_query +
+- http_message_object.c +
++
- HttpMessage::__construct()
+- HttpMessage::fromString()
+- HttpMessage::getBody()
+- HttpMessage::setBody()
+- HttpMessage::getHeaders()
+- HttpMessage::setHeaders()
+- HttpMessage::addHeaders()
+- HttpMessage::getType()
+- HttpMessage::setType()
+- HttpMessage::getResponseCode()
+- HttpMessage::setResponseCode()
+- HttpMessage::getRequestMethod()
+- HttpMessage::setRequestMethod()
+- HttpMessage::getRequestUri()
+- HttpMessage::setRequestUri()
+- HttpMessage::getHttpVersion()
+- HttpMessage::setHttpVersion()
+- HttpMessage::getParentMessage()
+- HttpMessage::send()
+- HttpMessage::toString()
+http_request_object.c + + + ++
- HttpRequest::__construct()
+- HttpRequest::__destruct()
+- HttpRequest::setOptions()
+- HttpRequest::getOptions()
+- HttpRequest::setSslOptions()
+- HttpRequest::addSslOptions()
+- HttpRequest::getSslOptions()
+- HttpRequest::addHeaders()
+- HttpRequest::setHeaders()
+- HttpRequest::getHeaders()
+- HttpRequest::setCookies()
+- HttpRequest::addCookies()
+- HttpRequest::getCookies()
+- HttpRequest::setUrl()
+- HttpRequest::getUrl()
+- HttpRequest::setMethod()
+- HttpRequest::getMethod()
+- HttpRequest::setContentType()
+- HttpRequest::getContentType()
+- HttpRequest::setQueryData()
+- HttpRequest::getQueryData()
+- HttpRequest::addQueryData()
+- HttpRequest::addPostFields()
+- HttpRequest::setPostFields()
+- HttpRequest::getPostFields()
+- HttpRequest::setRawPostData()
+- HttpRequest::addRawPostData()
+- HttpRequest::getRawPostData()
+- HttpRequest::addPostFile()
+- HttpRequest::setPostFiles()
+- HttpRequest::getPostFiles()
+- HttpRequest::setPutFile()
+- HttpRequest::getPutFile()
+- HttpRequest::getResponseData()
+- HttpRequest::getResponseHeader()
+- HttpRequest::getResponseCookie()
+- HttpRequest::getResponseBody()
+- HttpRequest::getResponseCode()
+- HttpRequest::getResponseInfo()
+- HttpRequest::getResponseMessage()
+- HttpRequest::getRequestMessage()
+- HttpRequest::getHistory()
+- HttpRequest::clearHistory()
+- HttpRequest::send()
+http_requestpool_object.c + + + ++
- HttpRequestPool::__construct()
+- HttpRequestPool::__destruct()
+- HttpRequestPool::reset()
+- HttpRequestPool::attach()
+- HttpRequestPool::detach()
+- HttpRequestPool::send()
+- HttpRequestPool::socketPerform()
+- HttpRequestPool::socketSelect()
+- HttpRequestPool::valid()
+- HttpRequestPool::current()
+- HttpRequestPool::key()
+- HttpRequestPool::next()
+- HttpRequestPool::rewind()
+http_response_object.c + + + + ++
- HttpResponse::setHeader()
+- HttpResponse::getHeader()
+- HttpResponse::setCache()
+- HttpResponse::getCache()
+- HttpResponse::setGzip()
+- HttpResponse::getGzip()
+- HttpResponse::setCacheControl()
+- HttpResponse::getCacheControl()
+- HttpResponse::setContentType()
+- HttpResponse::getContentType()
+- HttpResponse::guessContentType()
+- HttpResponse::setContentDisposition()
+- HttpResponse::getContentDisposition()
+- HttpResponse::setETag()
+- HttpResponse::getETag()
+- HttpResponse::setLastModified()
+- HttpResponse::getLastModified()
+- HttpResponse::setThrottleDelay()
+- HttpResponse::getThrottleDelay()
+- HttpResponse::setBufferSize()
+- HttpResponse::getBufferSize()
+- HttpResponse::setData()
+- HttpResponse::getData()
+- HttpResponse::setStream()
+- HttpResponse::getStream()
+- HttpResponse::setFile()
+- HttpResponse::getFile()
+- HttpResponse::send()
+- HttpResponse::capture()
+Generated at: Wed, 05 Oct 2005 15:34:24 +0000