This is the easiest to install users online script I have found. It is included here with written permission from perlonline.com. Your host needs to support cgi scripts and provide you with a place to run them for you to be able to install this script.
Follow these easy steps for installation:
There are two ways to add the script on your page where you want it to appear, javascript and ssi. Javascript is the easiest of the two. If your pages are already prepared for ssi with the .shtml extension, you would be better off using ssi.
Add this code to your page where you want the counter to appear:
<script language="JavaScript" src="/cgi-bin/online/online.cgi?output=javascript"> </script> users online
Upload the updated page to your server, and if you see a number you've installed it correctly.
You can also add the code to your site using SSI, but your pages have to have the .shtml extension if your server requires it:
<!--#include virtual="/cgi-bin/online/online.cgi" --> users online
Enjoy!