|
Re: How to count the number of Users visited by Website Posted: 25 Oct 2007
Okay, good question. Although I usually suggest folks to ask questions irrelevant to the topic of the tutorial, in the forum; I make an exception for you.
One technique that I use on Stardeveloper.com underneath is to use a client IP address and the hash code of the "User-Agent" header sent by the client to uniquely identify a user. I use a session time out of 30mins to time out a session. If a user from the same IP and User-Agent sends another request before 30mins have elapsed from his previous request, I simply update the 'lastAccessedOn' variable to the current date/time. Then a user will have another 30mins to send a request to keep his/her session alive.
|