actually this is an interesting problem... if you are willing to continue a discussion on this in the phorum and and write some code to share i'd be interested... more than just downloading someone elses code
the basic problem is the statelessness of webpage views...
you can't really have an accurate number of ppl online because the polling time from a viewer to your server is limited by their time between clicks...
the most basic solution i can see would be to keep one big very active sql table...
UsersOnline: ip_address, time_of_last_view
everypage load you would need to either put in a new row, or update an existing row in the table, with a new time_of_last_view
also set a timelimit, say 5 minutes, and every page load remove all rows from the table whose time of last view was more than the timelimit ago
so all you would have to do is count(*) that table to find a good approximation of users online at the time.
only problem with this is that everypage load would have to do a few sql calls. could be expensive. And ppl using proxies and such might give inaccurate results by mushing several different viewers under the same ip address.
one solution would be to use the login_id of logged in users rather than their ip_addresses, and only use their ip for anonymous users
id love to hear other peoples opinion on this.