Jump to content

Help with Integration


Ratneer

Recommended Posts

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.

Link to comment
Share on other sites

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();

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.