Ratneer Posted June 2, 2011 Share Posted June 2, 2011 Okay, I run a website; I wrote it from scratch, it's own database. With this website, I also run a news section (Run by wordpress), a wiki (Run by MediaWiki), A chat system (X7Chat), and a Live Help system (Mibew Messenger). I am looking to integrate all four of these systems to run off the same login as my main website. I would like it so that when the user logs in to the main site, it automatically logs in and sets the cookies for the other 4 systems. I also want it so when a user registers, it automatically registers them on the other 4 systems. I have achieved this with the chat system. I duplicated the Cookies and I have it so that if a user logs in to the main site, it sets the cookies for the chat, and when a user registers, or changes their password or email, it updates it on the chat table. But, I am finding it quite more difficult for the Wiki, Wordpress, and the Live Help system. The cookies were easy to duplicate for the chat system, and inserting the rows was fairly simple for the chat system, but it is quite a bit more complicated with the other systems. I am hoping someone here has done this before and could help me out on this one, because I am clueless. Thanks in advance for all that help. Quote Link to comment https://forums.phpfreaks.com/topic/238160-help-with-integration/ Share on other sites More sharing options...
Tenaciousmug Posted June 2, 2011 Share Posted June 2, 2011 Why don't you run $_SESSION instead of $_COOKIE? When they login, you can start a session of that user such as $_SESSION['userid']; And then at the top of every page have: session_start(); And that session will be carried out to every page that has the session_start() function at the top of their page. And then when they logout, you can destroy the session by: session_destroy(); Quote Link to comment https://forums.phpfreaks.com/topic/238160-help-with-integration/#findComment-1223848 Share on other sites More sharing options...
Ratneer Posted June 2, 2011 Author Share Posted June 2, 2011 I don't believe your response has much to do with my problem, but as for why I don't use sessions is because honestly, this web project started out when I first started learning php, and I had no clue what sessions even where back then, and now that my entire system runs with cookies, I'd rather not rewrite it until I do a major rehaul of everything. I plan here when I get to the point, I will go ahead and rewrite the entire code and I might just switch to using sessions. Quote Link to comment https://forums.phpfreaks.com/topic/238160-help-with-integration/#findComment-1223867 Share on other sites More sharing options...
Ratneer Posted June 4, 2011 Author Share Posted June 4, 2011 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/238160-help-with-integration/#findComment-1225254 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.