Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

http_parse_cookie(3) [php man page]

HTTP_PARSE_COOKIE(3)							 1						      HTTP_PARSE_COOKIE(3)

http_parse_cookie - Parse HTTP cookie

SYNOPSIS
object http_parse_cookie (string $cookie, [int $flags], [array $allowed_extras]) DESCRIPTION
Parses HTTP cookies like sent in a response into a struct. PARAMETERS
o $cookie - string containing the value of a Set-Cookie response header o $flags - parse flags ( HTTP_COOKIE_PARSE_RAW) o $allowed_extras - array containing recognized extra keys; by default all unknown keys will be treated as cookie names RETURN VALUES
Returns a stdClass object on success or FALSE on failure. EXAMPLES
Example #1 Using http_parse_cookie(3) <?php print_r(http_parse_cookie("foo=bar; bar=baz; path=/; domain=example.com; comment=; secure", 0, array("comment"))); ?> The above example will output: stdClass Object ( [cookies] => Array ( [foo] => bar [bar] => baz ) [extras] => Array ( [comment] => ) [flags] => 16 [expires] => 0 [path] => / [domain] => example.com ) SEE ALSO
http_parse_headers(3), http_parse_message(3), http_build_cookie(3). PHP Documentation Group HTTP_PARSE_COOKIE(3)

Check Out this Related Man Page

HTTP_PARSE_MESSAGE(3)							 1						     HTTP_PARSE_MESSAGE(3)

http_parse_message - Parse HTTP messages

SYNOPSIS
object http_parse_message (string $message) DESCRIPTION
Parses the HTTP $message into a simple recursive object. PARAMETERS
o $message - string containing a single HTTP message or several consecutive HTTP messages RETURN VALUES
Returns a hierarchical object structure of the parsed messages. EXAMPLES
Example #1 Using http_parse_message(3) <?php define ('URL', 'http://www.example.com/'); print_r(http_parse_message(http_get(URL, array('redirect' => 3)))); ?> The above example will output something similar to: 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] => ... ) ) SEE ALSO
http_parse_headers(3), the HttpMessage class. PHP Documentation Group HTTP_PARSE_MESSAGE(3)
Man Page