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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.