PHPiSean Posted August 9, 2011 Share Posted August 9, 2011 Hello Here's the situation I plan to have the same login information for site1.com and site2.com. I want my users to be able to login on site1.com and be logged in on site2.com when they visit it. How should i go forth in doing so? From what I looked up, this is very unsafe to do. But then again, how does codecanyon do so? Thanks! Quote Link to comment Share on other sites More sharing options...
phpSensei Posted August 9, 2011 Share Posted August 9, 2011 One way I would go about this is saving the session cookie information in a database which server A and server B will both use. You would also need to make a Garbage Collector function which will truncate the session tables Quote Link to comment Share on other sites More sharing options...
PHPiSean Posted August 9, 2011 Author Share Posted August 9, 2011 One way I would go about this is saving the session cookie information in a database which server A and server B will both use. You would also need to make a Garbage Collector function which will truncate the session tables Hello again and thanks for being so helpful! Yes, server a and b both use the same database. Should I just create another column for that or does that need its own significant db? EDIT: Meant to say table not db Quote Link to comment Share on other sites More sharing options...
phpSensei Posted August 9, 2011 Share Posted August 9, 2011 Hi PHPiSean, Thats the direction I would take, and create an entire table(s) for session cookies information. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.