virtuexru Posted September 28, 2007 Share Posted September 28, 2007 OK, so I have two domains. I want to 'inter-link' the users somehow. I'm using MySQL/PHP. Basically this is how it should work: 1. User logins in on Domain1.com 2. User moves to Domain2.com and is still logged in My 'check to see if user logged in' script is working through Cookies/Session. Is this possible or am I a complete moron? What are some options. Quote Link to comment https://forums.phpfreaks.com/topic/71092-cross-site-user-db-system/ Share on other sites More sharing options...
BlueSkyIS Posted September 28, 2007 Share Posted September 28, 2007 set a cookie at domain one, check for it at domain 2 or if both sites on the same server, start a session at domain 1, pass session_id to domain 2, pick up session from where it left off on domain 2 Quote Link to comment https://forums.phpfreaks.com/topic/71092-cross-site-user-db-system/#findComment-357480 Share on other sites More sharing options...
virtuexru Posted September 29, 2007 Author Share Posted September 29, 2007 How would I check the cookie for that specific domain? What's the PHP func? Quote Link to comment https://forums.phpfreaks.com/topic/71092-cross-site-user-db-system/#findComment-358053 Share on other sites More sharing options...
rarebit Posted September 29, 2007 Share Posted September 29, 2007 Arn't cookies domain specific? So unless the address's are the same you can't use the single cookie method. So you either need to put PHPSESSID in each url (not recommended), or as a page is called it set's / check's the cookie for it's site, and also tells the page to include a section from the other site, which also set's / checks a cookie. This is a bit like when you go to a site and you get adverts and cookies from other sites, and are tracked. Quote Link to comment https://forums.phpfreaks.com/topic/71092-cross-site-user-db-system/#findComment-358060 Share on other sites More sharing options...
virtuexru Posted September 29, 2007 Author Share Posted September 29, 2007 So should I just query everytime a user goes into a login specific page? Like for instance I can remote-connect to the DB and check on the fly if a user is logged in or not? Quote Link to comment https://forums.phpfreaks.com/topic/71092-cross-site-user-db-system/#findComment-358065 Share on other sites More sharing options...
virtuexru Posted September 30, 2007 Author Share Posted September 30, 2007 Any1? Quote Link to comment https://forums.phpfreaks.com/topic/71092-cross-site-user-db-system/#findComment-358603 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.