Page 1 of 1

Users online

Posted: Tue Nov 19, 2002 8:52 pm
by Ximian
http://www.evilwalrus.com/users_online.php

I am looking for the code to something like that. I know there is http://www.evilwalrus.com/viewcode/484.php I already have that installed, but I am looking for something more like the first. If anyone has that code, or something very similar, I would be very thankful if I got ahold of it.

users online

Posted: Tue Nov 19, 2002 9:32 pm
by Intrigue
Something like that would be extremely easy to use, simply create a database table, with fields like ID, ip, hostname, agent, page, and timestamp and insert the appropriate values in each when the page loads (put it in an include to be used on every page), do garbage collection in the include as well eg: DELETE FROM users_online WHERE timestamp < time()-3600 and include it on the top of every page, i've done it before, and it is really simple :D

Posted: Wed Nov 20, 2002 9:49 pm
by Ximian
I know very little PHP, so I guess I'll start working on a script soon. I have a 5 day break from school next week, so I guess I'll do something productive with that time.

Posted: Wed Nov 20, 2002 9:50 pm
by phice
Ximian wrote:I know very little PHP, so I guess I'll start working on a script soon. I have a 5 day break from school next week, so I guess I'll do something productive with that time.
I have a week off, as well. ;)