PDA

View Full Version : Display Current Users Online



Darin
July 17th, 2001, 22:32
Hello,

I have a question for all JavaScript experts out there. I'm looking for a script, or some kind of code (Not PHP or ASP), to display the current users online at my site. I'm now getting 12,000 unique daily visitors and I would like to know how many people are currently on the site, or the main page for that matter.

I'm not looking for any kind of CGI script, since it's a waste of resources. My friend uses a PHP include and has this on his site, but he converted his .shtml page to .php. That is what I use - SHTML. So I don't think that PHP will work very well, or at all for that matter.

If anybody can help me out, please do. Thank you very much!! :D

lucifer
July 18th, 2001, 04:59
you need something server side

you could use serverside JavaScript but I'd use php or perl which should be fine with SSI

how do you count people you using cookies or IP address's?

Darin
July 18th, 2001, 12:40
I would preffer to use Perl. I have several other Perl scripts running, and they run fine. I would like to count users with cookies I guess. I've never even heard of ServerSide JavaScript.

lucifer
July 18th, 2001, 14:54
Originally posted by Darin
I've never even heard of ServerSide JavaScript. I've heard of it but never used it


do you have mySQL?

milkbar
July 18th, 2001, 18:27
I use www.sitemeter.com for that

Darin
July 18th, 2001, 21:59
We are not talking about counters milkbar!

lucifer: Yes, I do have MySQL. I'm not sure if my host has it working on the server I'm currently on, but my forums database is on another server that has MySQL. I can ask and find out. Any ideas for anything that doesn't use a MySQL database?

I know that with the database, I would be able to see all current online visitors on my site, and without a db, I would only be able to see the current visitors on the front page. Either way, I would preffer without a MySQL database.

lucifer
July 19th, 2001, 06:29
mySQL is good for high hit scripts as it handles the problems of stopping data coruption. It's posible to have one without it though. Does your current db keep user info if it does it'd be easier to link into that rather than getting the info twice

milkbar
July 19th, 2001, 09:19
We are not talking about counters milkbar!
I'm talking about sitemeter's "who's online" feature. and it's not a counter anyway, it's more of a tracker.

Darin
July 19th, 2001, 14:03
SiteMeter displays their stupid little box on your site. The forums database I think keep user info. Not sure though... So, there is no javascript code to display users online?

milkbar
July 19th, 2001, 15:32
sorry