From: Michael Wallner
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
?>
+<?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
)
?>
+
Parses HTTP cookies like sent in a response into a struct.
+Expects a string as parameter containing the value of a Set-Cookie response header.
+Returns an stdClass object with the cookie params as properties on success or FALSE on failure.
+Example:
+<?php
print_r(http_parse_cookie("foo=bar; path=/"));
stdClass Object
(
[name] => foo
[value] => bar
[path] => /
)
?>
Returns the request method name as string on success, or FALSE on failure.
Generates a form-encoded query string from an associative array or object.
-Compress data with the HTTP compatible GZIP encoding.
Expects the first parameter to be a string which contains the data that
should be encoded. Additionally accepts an optional in paramter specifying
@@ -361,7 +369,7 @@ best compression ratio.
Uncompress data compressed with the HTTP compatible GZIP encoding.
Expects a string as parameter containing the compressed data.
Returns the decoded string on success, or NULL on failure.
-Compress data with the HTTP compatible DEFLATE encoding.
Expects the first parameter to be a string containing the data that should
be encoded. Additionally accepts an optional int parameter specifying the
@@ -372,17 +380,6 @@ compression ratio.
Uncompress data compressed with the HTTP compatible DEFLATE encoding.
Expects a string as parameter containing the compressed data.
Returns the decoded string on success, or NULL on failure.
-Compress data with the HTTP compatible COMPRESS encoding.
-Expects the first parameter to be a string containing the data which should
-be encoded. Additionally accepts an optional int parameter specifying the
-compression level, where -1 is default, 0 is no compression and 9 is best
-compression ratio.
Returns the encoded string on success, or NULL on failure.
-Uncompress data compressed with the HTTP compatible COMPRESS encoding.
-Expects a string as parameter containing the compressed data.
-Returns the decoded string on success, or NULL on failure.
Check for feature that require external libraries.
Accpepts an optional in parameter specifying which feature to probe for.
@@ -759,7 +756,7 @@ HttpMalformedHeaderException, HttpEncodingException.
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 HttpRequestPoolException (HttpRequestException, HttpInvalidParamException).
@@ -1022,6 +1019,8 @@ http.cache_log is set.Generated at: Fri, 09 Dec 2005 13:56:42 +0100
+Generated at: Wed, 14 Dec 2005 16:25:48 +0100