Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: counter to show how many people


Message #1 by KATHLEEN.M.WHALEN@c... on Tue, 15 May 2001 09:37:34 -0400
The method I know that I think worx best is logging the IP (pref. to a file)
from which the user logs onto, and then restrict that IP from adding to your
counter for a small period of time (say 5 minutes).
If you don't reopen that IP for other users, you might exclude valid
visitors (for example if they visit from the local book library).
This method is robust enough for a counter.
I don't know why you would bother figuring out if a visitor is unique, since
this is currently not possible and not necessary for your goal.


-----Original Message-----
From: Lawrence K [mailto:lawrence@k...]
Sent: Thursday, May 24, 2001 1:07 AM
To: javascript
Subject: [javascript] Re: counter to show how many people


I am looking for a counter that will count the number of people who are
visiting my site right now. I've been thinking of writing one myself, in
PHP. I suppose that I could cookie people's browsers the first time they
show up, and also increment a character string in an otherwise empty file.
But how to remove characters from the string? Or if I add to a number,
when would I know when to decrement the number. I'm trying to think of how
to measure unique visitors. Any ideas?

I've thought of sessions, too, but don't know how to count the end of
sessions.



  Return to Index