Cross Site Cookies

I have a website at domain1, which uses a forum hosted on domain2.

When users 'login' to the forum, a cookie is stored, but when I try to read it IE doesn't find it, but Mozilla does.

It's a home-made Perl forum, to store the cookie I use...

print "Set-Cookie: NAME=$_[0]; expires=$expdate\n";

and to retreive it I use...

sub GetCookie
{
$name = "NULL";

if ($ENV{'HTTP_COOKIE'} ne "")
{
$cookie_data = $ENV{'HTTP_COOKIE'};

@cookies = split(/;/, $cookie_data);

foreach $cookie (@cookies)
{
($field, $value) = split(/=/, $cookie);

if (($field eq " NAME") || ($field eq "NAME"))
{
$name = $value;
}
}
}

return $name;
}

What's going on? Is it because I'm using two sites? The whole forum is hosted on domain2, so it's not like the cookie is stored by a script hosted on domain1. The forum simply sits in a frame.

Any help would be great, it's confusing the hell out of me. Even if it's just a quick setting that my users need to set in IE specific to my domain.

Cheers,

Rob

 

 

 

 

Top