Forum Moderators: coopster
At Yahoo they have found something, which will work from main domains & subdomains!
I checked the session that Yahoo registers on my browser and it registered as from domain .yahoo.com with the dot before the domain.
I like that!
How do they do that?
The first argument would be the session cookie name, usually PHPSESSID, you can check it in phpinfo(). session_id() speaks for itself, the 0 means "expire when the close the browser", the "/" maens in all directories. setting the 5th argument of the cookie to .somesite.com makes it available in all subdomains of somesite.com but not at the main domain.
So you need to add this as well:
if ($HTTP_HOST!= $SERVER_NAME) header("Location: [domain.com");...]