How do you determine how many users are logged into a site at once or viewing a certain page? Obvious examples are all over this board. If I use a session or cookie, how do I wipe it clean when the user closes his browser?
i think most that arent attached to login systems keep an ip address in a database for a certain amount of time, and when the file is updated and the ip hasnt been seen in a certain amount of time it removes it. i have written two simple versions of this (one use mysql one use flatfile) and they are on my site for download. www.neoprogrammers.com if you wanted to see the code.
So it is always on a delay by whenevre you update the script, correct? I was thinking something like that, but was not sure if you could do an instant thing. I will most likely do it the delay way.
in my programs, the list is updated and checked on every page load. since it doesnt make sense to run a script by cron or something when no one is online. all the adding and removing is done before the count is updated.
true. i can just load the script into my config file i suppose.