(no version information, might be only in CVS)
Parses HTTP cookies like sent in a response into a struct.
String containing the value of a Set-Cookie response header
Parse flags
Array containing recognized extra keys. By default all unknown keys will be treated as cookie names.
Returns an stdClass like shown in the example on success or FALSE on failure.
Example 1. Using http_parse_cookie()
<?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 )