I have got a website and now i have to add a forum. The forum will be on a sub-domain of the site, but may be on an 开发者_如何学Goother server.
The user must sign-in only from the website, to be connected on the forum. If the user try to see the forum without sign-in on the website, , he'll be redirect to the the sign-in page form the website, if he is yet connected from the website, he'll can see the site.
My question is how to kwow on the forum ,if there is a session open by the user on the website??? how do they both communicate ? (cookies stuff?, webservice?, and how?)
Cookies can be saved on the entire domain, thus allowing subdomains to read them.
setcookie("TestCookie", $value, time()+3600, "/~rasmus/", ".example.com", 1);
.example.com should be replaced with your domain.
http://php.net/manual/en/function.setcookie.php
Single Sign-On?
精彩评论