Reputation: 35235
Here's a scenario:
You log into GMail at mail.google.com and then you go to docs.google.com and you are automatically logged in there too.
Is it possible to share user accounts between sites like that with PHP and how?
Upvotes: 2
Views: 189
Reputation: 9584
Save session to a database instead of a file then have both sites look to that DB for session variables.
check this out http://shiflett.org/articles/storing-sessions-in-a-database
Upvotes: 2
Reputation: 53597
The most simple way would be to do just what GMAIL and THIS site do and use some type of open ID.
Or, you can just learn how they implement it and re-invent the wheel or create another open ID service.
Upvotes: 0
Reputation: 29976
You definitely can. Check out the answer to this post:
Cookies across subdomains and hosts
Upvotes: 1