PDA

View Full Version : multi-domain cookies


DarkReaper
05-30-2002, 05:32 PM
I'm trying to get the cookies vB sets to apply to all 3 domains my website uses(so you could go to forums.anydomain.com and be logged in) but it's not working quite right. In /admin/functions.php I changed this:

if ($cookiedomain) {
setcookie($name, $value, $expire, $cookiepath, $cookiedomain, $secure);
} else {
setcookie($name, $value, $expire, $cookiepath, '', $secure);
}


To this:


setcookie($name, $value, $expire, $cookiepath, '.seriouscommunity.com', $secure);
setcookie($name, $value, $expire, $cookiepath, '.seriouszone.com', $secure);
setcookie($name, $value, $expire, $cookiepath, '.seriousengine.com', $secure);


It didn't work though. What am I doing wrong?

DarkReaper
05-31-2002, 01:21 AM
bump

Admin
05-31-2002, 02:05 PM
You can't have multi-domain cookies, it's impossible AFAIK.

scsa20
05-31-2002, 09:17 PM
go to your vBulletin options and go look for HTTP Headers and output and then look for Cookie Domain. in that box, add .YourURL.com and replace the code you replaced back to the old code.

==============================================
oh, I see what your trying to do, you can't do that, you can only do it with subdomains :rolleyes:
==============================================

DarkReaper
06-01-2002, 01:25 AM
D'oh! There must be SOME way to achive what I'm trying to do if not through multi-domain cookies...

Birdie501
06-01-2002, 09:54 AM
isn“t it possible to set 3 different cookies in one step? So if the user visit domain1.com automatically three cookies will be set with all the domains i need?

so if the user comes back but visit another domain it should work?

Admin
06-01-2002, 11:13 AM
You cannot set a cookie for a different domain, Birdie. Only for sub-domains.