homepage Welcome to WebmasterWorld Guest from 54.204.58.87
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
determining "number of people on the site"
any way to code your own small solution?
amznVibe




msg:665757
 8:02 pm on Feb 20, 2003 (gmt 0)

everyone has seen sites that list things like "45 people current on the site" and of course with http this has to be subjective because you are simply measuring how many unique IP's requested a page in the last so many minutes

the question is, without turning to a 3rd party stats service, how can I determine this, even if its just for myself and not for public posting (which I think can be tacky in some cases, like public page counters)

is this a complex piece of code? can it be done in perl/SSI? php?
any small open source around that someone can point me to before I waste alot of hours on this ;)

 

Mardi_Gras




msg:665758
 8:10 pm on Feb 20, 2003 (gmt 0)

whos-on.net can do what you what you're looking for, but it is not free ($50-$100). But there is a free demo available, and a live demo on the site.

Maybe someone else knows some free solutions...

Shakil




msg:665759
 8:13 pm on Feb 20, 2003 (gmt 0)

a couple of sites I regularly look at, always have the same amount of visitors 24/7

Shak

aspdaddy




msg:665760
 8:26 pm on Feb 20, 2003 (gmt 0)

Application variables, something like this :

application_onstart{
application("online")==0;

session_onstart{
application("online")++;

session on_end{
application("online")--;

SlyGuy




msg:665761
 8:33 pm on Feb 20, 2003 (gmt 0)

is this a complex piece of code?

Nope. Just type in "82 visitors currently online" somewhere on your page and change the number every hour or so, as to not run into the problem that Shak has noticed.

;)

amznVibe




msg:665762
 10:04 pm on Feb 20, 2003 (gmt 0)

what I was thinking is

1. keep a seperate log, a simple text file, written to by the most popular pages on the site via SSI, with a simple timestamp and IP

2. every time the script is triggered (by SSI, etc) first trim the log - remove any entries that are over 5 minutes old

3. every time the script is triggered, after trimmed, count the number of unique ip's found

that final number, more or less, is your number of unique visitors in the past five minutes, hence your "number of people online"

the biggest weakness is of course people on aol proxies and other huge proxies but that number shouldn't too far off

beachbum




msg:665763
 8:45 pm on Feb 25, 2003 (gmt 0)

amznVibe,

It sounds like you already know what to do, if you want to see examples of how others have done it...or, you just don't want to re-invent the wheel, you can find scripts that do what you're asking at hotscripts.com. I cannot recommend any particular one, as I haven't used one.

This a good resource for free or open source code for many things, in the language of your choice. I often find it helpful to study someone else's code, when I'm stumped.

I 'highly' recommend that you actually understand every line of code in any of these scripts before deploying it on your site!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved