I have a problem. We own 3 sites site1.com site2.com and site3.com. Site one is our master site where we register users and where they log in. We use SESSION to perform the 'LOGIN'. Our problem is to log the same user on site2 and site3 as soon as he logs on to site1. What we want is something like the Google or Microsoft scheme where you log into one main site and automatically log in to the other services.
//Aqui crio a sessão.
session_start();
$_SESSION['firstname'] = $row['firstname'];
$_SESSION['username'] = $row['username'];
$_SESSION['useremail'] = $row['email'];
//Verifica a sessão
if(!isset($_SESSION['useremail'])){
//Não está logado
}else
{
//Está logado
}
The problem is that when we recover SESSION in sites 2 and 3 does not recover, we studied and saw that it was because the server's cookies stay on server 1 and so it will not. I've also been researching the subject and found some solutions, but it was for same server sites. Can you help us ? Sending a POST to a file on each site to seclude the session is dangerous or do we have to use the DB to do this control? How can we do that ? Thanks in advance for all the help.