Server-Status 0.1 by Steve Tibbett 28-Nov-1999 This is an ISAPI module that will give you real-time information on what your web server is doing. ISAPI modules are extensions for Microsoft's Internet Information Server, and any web server that supports ISAPI will work with this module. The stats it will show you are: 1) When the web server was started 2) Total number of hits since the server was started 3) List of all the URLs that have been fetched (minus args) and how many times 4) List of all the unique IP addresses that have visited your site (with hits) 5) List of all the unique browsers (User-Agents) that have visited (with hits). 6) Same list for all the Referers (where your hits are coming from). 7) For the last 24 hours, how many hits you've gotten each hour. 8) The last 100 hits on your site, with time and IP address. All of these stats are reset any time you restart IIS. For persistent stats, use some sort of log analysis tool. They're also live - they update instantly. To install, bring up the Internet Services Manager, go into the section where you define what ISAPI modules are loaded, and add Uptime.DLL from the Release directory. (This applies to IIS 5.0, and I believe 4.0 - earlier versions required you to edit the registry; search the IIS docs for "ISAPI" for information on how to do this). Once it's installed, go to http://yoursite/server-status and you'll see the real time stats! Limitations: - There is currently no security on the information. If you think this information is secret, then don't use this module without adding some sort of security. - Referer hits from within your site are included on the referer list. They should probably be filtered. - Failed hits still count. - The code should be stable and safe from buffer overflows, but it will keep allocating memory as needed. The amount of memory used should be insigifnicant unless you have a huge site and a huge number of users and a small amount of RAM... If you run into RAM problems, try taking the DLL out and trying it. If it's a problem, you can put limits on the # of referers, browsers and IP addresses it remembers. Compiling: I used Microsoft Visual Studio 6.0. If you have VS6, you should be able to load up the DSP file (DevStudio Project) and go. If you have another compiler, you probably don't have MFC so you won't be able to use it anyway! Distribution: This code is free; do with it what you like. If you make any changes, I'd appreciate it if you'd send them back to me so I can merge your changes with mine. Thanks. You can contact me at stevex@home.com. The current version will be at http://food.dhs.org/code.