Jump to content

Creating a Simple (but effective) Offline/Online Script.


Bloodrun

Recommended Posts

Alright, well I am creating a forum. And one of the things I would like to get settled, is a offline/online script.

Now I have an extremely basic set up for a offline/online function, the problem is, that it's so basic, it sometimes doesn't work.

 

The way I have it that when someone logs in, it inserts into a mysql database that they are logged in. The problem with this is, that if they don't log out, it will continue saying they are logged in, and vice versa.

 

Now, I know I can fix that with a simple timeout code (which I dont know how to write..)

The other thing I would like to do, is make a "Whose online" option, and I know that requires the users IP address, I believe, which again is something I don't know how to do, or don't know what to piece together in order to do it.

 

Can you give me some pointers?

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.