note 27293 added to function.setcookie
| From: | john dot wellesz at firstream dot net | Date: | Sun, 01 Dec 2002 02:05:47 +0000 |
| Subject: | note 27293 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40195@lists.php.net to get a copy of this message | ||
Well I've just discovered something that was really unclear to me: the real use of the
"domain" parameter,
This parameter allows every web site that is a subdomain of "domain" to receive the
cookies set by your website.
for example:
if you do
setcookie("answer", "42", time() + 365 *86400, "/",
"foo.com");
the "compteur" cookie will be received by foo.com but also by www.foo.com or
www.foo2.foo.com !
NOTE: in the domain parameter you can specify a different website than the one from which the cookie
is sent.
btw: Netscape 7 integrate a very useful cookie browser.
--
http://www.php.net/manual/en/function.setcookie.php
http://master.php.net/manage/user-notes.php?action=edit+27293
http://master.php.net/manage/user-notes.php?action=delete+27293
http://master.php.net/manage/user-notes.php?action=reject+27293