in reply to how do to a 'who is online' feature
arthas's answer is essentially correct. If "database" intimidates you, think "cache". A flat file works, though you'll be rewriting it each time you record a page hit from a user. Depending on your site load, this may or may not be an issue.
No matter how you decide to capture data, it suffices to record a username and a "last visited" timestamp. The timestamp is used to determine who to show as being online. You might, for example, say that any user who has hit the website within the last 5 minutes is "online". Depending on how you're keeping records, the timestamp can also be used to expire a user from the cache.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: how do to a 'who is online' feature
by zengargoyle (Deacon) on May 21, 2003 at 11:15 UTC |