Re: Cookies in frames with different domains

From: Date: Wed, 23 Jan 2002 08:54:10 +0000
Subject: Re: Cookies in frames with different domains
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-81656@lists.php.net to get a copy of this message
If i'm not mistaken, you cannot set cookie for another domain... Cookie is visible for domain only it was set for. > Hi all, > > I am trying to use a cookie on the now popular "stealth redirect" method > which involves having a frame encapsulate another URL. > > For reference, I have www.domain1.com point to a file called index.htm. In > index.htm, it just has two frames. The first frame points to > www.domain2.com/subdir as the "source" (src) and the 2nd frame (invisible) > points to a blank html file. > > When I use cookies like this: > setCookie("Username",$username,time()+(3600*24*365),"/"); > > it works when my browser points to www.domain2.com/subdir. > > However, when I go to www.domain1.com, it doesn't work anymore (even if I > set the cookie again, it doesn't display). Any ideas? > > I have tried using: > > > setCookie("Username",$username,time()+(3600*24*365),"/",".domain1.com"); > > and > > > setCookie("Username",$username,time()+(3600*24*365),"/",".domain2.com"); > > with no luck. > > > Thanks, > Chris Valentin Petruchek (aki Zliy Pes) http://zliypes.com.ua mailto:val@zliypes.com.ua

« previous php.general (#81656) next »