note 55176 deleted from function.setcookie by betz
| From: | betz@php.net | Date: | Wed, 27 Jul 2005 06:09:51 +0000 |
| Subject: | note 55176 deleted from function.setcookie by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-92530@lists.php.net to get a copy of this message | ||
Note Submitter: Nat
----
I have 2 domains and i want to set cookie on a first one, and after to use it on a second one (in
fact, there are many domains and subdomains, but i have to set cookie in a one place). I'd
tried 2 ways, but seems it's imposible to do this at all.. Is anybody knows??
I.
// Setcookie on domain1.ab
setcookie("mycook", "something", time()+86400,"\",
".domain2.ab");
// On domain2.ab
echo $_COOKIE["mycook"];
-->It doesn't works..
II.
// Setcookie on domain1.ab
require '/domain2.ab/1.php';
// On domain2.ab, in 1.php
setcookie("mycook", "something", time()+86400,"\",
".domain2.ab");
//After on domain2.ab:
echo $_COOKIE["mycook"];
-->It doesn't works too.