Emanuil Rusev
Emanuil Rusev

Reputation: 35235

Sharing user accounts between multiple sites

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

Answers (4)

jwerre
jwerre

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

Itay Moav -Malimovka
Itay Moav -Malimovka

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

brendan
brendan

Reputation: 29976

You definitely can. Check out the answer to this post:

Cookies across subdomains and hosts

Upvotes: 1

ChrisJ
ChrisJ

Reputation: 5251

You may want to have a look at OpenID.

Upvotes: 2

Related Questions