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! Link to comment https://forums.phpfreaks.com/topic/244295-pass-login-information-between-miltiple-sites/ 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 Link to comment https://forums.phpfreaks.com/topic/244295-pass-login-information-between-miltiple-sites/#findComment-1254707 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 Link to comment https://forums.phpfreaks.com/topic/244295-pass-login-information-between-miltiple-sites/#findComment-1254718 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. Link to comment https://forums.phpfreaks.com/topic/244295-pass-login-information-between-miltiple-sites/#findComment-1254719 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.