Re: Multiple Host's with setcookie

From: Date: Fri, 13 Jul 2001 14:15:58 +0000
Subject: Re: Multiple Host's with setcookie
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57732@lists.php.net to get a copy of this message
for example this code: setcookie('cookie_name', 'cookie_val', time()+3600, '/', '.domain.com'); results in this HTTP header: Set-Cookie: cookie_name=cookie_val; expires=Fri, 13-Jul-01 15:14:25 GMT; path=/; domain=.domain.com Jeremy Brand Jeremy Brand :: Sr. Software Engineer :: +393485323988 :: jeremy@nirvani.net http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "LINUX is obsolete" -- Andy Tanenbaum, January 29th, 1992 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get your own Free, Private email at http://www.smackdown.com/ On Fri, 13 Jul 2001, the following spilled from the mind of jeremy brand: > Date: Fri, 13 Jul 2001 16:08:06 +0200 (WEDT) > From: jeremy brand <jeremy@nirvani.net> > To: david jarvis <david@jumpinternet.com> > Cc: php-general@lists.php.net > Subject: Re: [PHP] Multiple Host's with setcookie > > That is correct. .domain.com is the correct way to do it. (make sure you > have the leading dot.) You are having some other problem. > > Jeremy > > > On Fri, 13 Jul 2001, the following spilled from the mind of david jarvis: > > > Date: Fri, 13 Jul 2001 09:36:14 -0400 > > From: david jarvis <david@jumpinternet.com> > > To: php-general@lists.php.net > > Subject: [PHP] Multiple Host's with setcookie > > > > Hi, I was wondering if there was a way to set a cookie so that it would be accessible over > > multiple hosts, for instance, mail.webpage.com, forums.webpage.com, ect. I tried setting the domain > > to .webpage.com, but when I read the cookie it says the domain is w ww.webpage.com, thus not being > > accessible by mail.webpage.com. Any thoughts would be greatly appreciated. > > > >

« previous php.general (#57732) next »