FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Passing Sessions





imagefree
A lot of sites on internet are using more than one 2nd level domains. Take an example of example.com

http://www.example.com/
http://services.example.com/
http://changes.example.com/

etc etc ...

User remains logged in while on the same site (and navigating to different sub-domains). There is a problem in doing this. When a user loggs in on a server, how to pass data to all the servers having different subdomains, to keep the person logged in on the whole of the website?

Are there any techniques, or builtin mechanism? Please help me finding out a sloution.

Thanks
alalex
The only solution I can think of right now is that they might not be subdomains, but mod_rewrited folders, so that you don't exit the domain...
I'm probably wrong with this, although it is a possibility...
rvec
maybe they include a script from the other domain and if it returns some value the user is logged in on that domain and stays logged in on the other.
jmlworld
Good example of this method are Yahoo Network and Google.

When login on flickr, mybloglog, yahoogroups, yahoo.co.uk, yahoo.com you'll use the same login screen.

I think they use a shared script on one parent domain, which the rest of the domains use.
imagefree
thanks for the suggestions. Can you all please help me about the shared script to keep people login over subdomains? I mean how to use it? (i can write it myself.)
jmlworld
@imagefree,

What web programming language do you use?

Edit:

You can store the session in a database, so that the second domain/subdomain can grab the same session from the same database.

If you're PHP fan, I got a useful article about that with example codes

Check this link: Sharing a session across multiple domains/servers with PHP

And it's examples on: PHP Sharing sessions between multiple domains
Related topics
php sessions
Sessions
PHP: Sessions and Cookies
PHP Sessions
php sessions
is mutiple login in windows XP simultaneously possible?
FireFox and Cookies/Sessions
php sessions for different accounts
Sessions are deleted fast.
php SESSIONS question
Deism vs Atheism
Laying at the beach, watching girls passing by=D
destroy\unset sessions?
Need Help : Dreamweaver sessions
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.