On my server I host multiple domains example.com, website.com, example.net .... you get the drift.
My question is, how can I read the cookie set by one of my other domains - when a user logs into one of my domain, I'd like to keep him logged in no matter what site he goes to, or at least recognize his credentials and ask for his password again -
I'm setting the cookie without any domain-name, but when I try to read the cookie with:
Code: Select all
<?php
echo $_cookie["LOGINID"];
?>What I'm wondering is, can I read the cookie set by one of my other domains? Is there a way to specify in php what domain to read the cookie from?
So I could do something like:
Code: Select all
<?php
echo $_cookie["domain"]["LOGINID"];
?>