Advanced CheckSum Verifier - MD5 and SFV checksum utility for Windows home
mail us
Advanced CheckSum Verifier - MD5 and SFV checksum utility for Windows
 HitsLog script  Home

HitsLog v1.2.0 (Freeware with source!)


Every webmaster wants to know how many people visit his website and whence they come. Usually to find out such information the webmasters analyze the web-server logs.

However, in case of shared hosting plans, when one web-server serves several sites, the access to log files is complicated because of the certain technical difficulties. For this reason all free and many inexpensive hosting plans do not allow access to web-server log files. Instead of it, in the best case, they offer the on-line tools, often very limited.

But if the hosting-plan allows to use CGI, Perl and SSI then webmaster can use the server-side scripts for producing log files.


Simple Perl script for logging the page hits and file downloads. The HitsLog produce the standard common or combined log files, which can be processed by any modern log analyzer (we recommend the ClickTracks Analyzer - powerful and easy to use tool with unique features).

The HitsLog use the classical way for embedding into web page - by using the SSI "include" directive, by remaining, thus, completely invisible for visitor. For logging the file downloads, is used also classical way - relocating by script. Main difference from other logging scripts is possibility to log also sizes of pages and files.


  1. First of all, you need configure the script. But if your hosting provider use the mod_perl module or path to Perl interpreter is /usr/bin/perl, and you are satisfied by the default settings, you can skip this step.

    Open the file in any text editor and configure the script for your needs:
    1. In the first line specify path to Perl interpreter. For example, if this path is /usr/bin/perl the first line should be #!/usr/bin/perl;
    2. Set the log file name template by changing the value of $logs variable. By default, the daily format with .log extension is used, i.e. the log file for 1 Jan 2002 will be 20020101.log, for 2 Jan 2002 - 20020102.log, etc.
    3. Set the log file format in $logformat variable: 0 - the common log format, 1 - combined, 2 - common with server name, 3 - combined with server name. The default value is 1.
    4. If you set the log format with server name, also need to set the default server name into the $servername variable.
    5. If you are planning to log also pages and files sizes, set sizes file name by changing $sizesname variable. The sizes file is plain text file with pages and files path and their sizes in bytes. For example:
        /  10211
        /about/ 23659
        /files/ 11573
        /files/photo001.jpg 102347
        /files/photo002.jpg 564398
        /files/photo003.jpg 768435
        /files/photo004.jpg 324657
      The default name is sizes.txt. If you do not planning to log the sizes, simply comment this variable or keep as is.
    6. Set index pages name in variable $indexpage. This variable also need only for logging the sizes. The default value is index.shtml.
    7. If you are want to resolve remote hosts addresses to their domain names, then set the variable $resolve to 1.
  2. Copy the file into your cgi-bin directory.
  3. Embed into every page the script call by inserting such line anywhere in the every page:
    <!--#include virtual="/cgi-bin/$SERVER_PROTOCOL" -->
    Your pages should have the appropriate extension to handle the SSI directives. In many cases this is .shtml or .shtm. Ask this from your hosting provider, if you don't know.
  4. In every link to downloadable files also insert the script call. For example, if your link point to file "/files/photo001.jpg", then change the link to "/cgi-bin/"


  • Produce log files in common or combined format, with or without the web server name;
  • Fully compatible with any modern log analyzer;
  • Fully invisible to visitors;
  • Can log the pages and files sizes too;
  • Can resolve remote hosts addresses online;
  • Very simple to use and fast to execute;

Changes history

- possibility to resolve the remote hosts addresses is added.
- possibility to log the server name is added.
- incompatibility with the some log analyzers has been fixed.

To-do list

Yes, currently HitsLog is very simple, but we are planning to develop and improve it more and more. In the near future, we plan to realize:

  • Possibility to log the cookies for better tracking of users.

In more long-term future we plan to add the following features:

  • Web interface for configuration, statistics and log management.
  • Tools for creating the sizes file.


  • any hosting plan with support of CGI, Perl and SSI.

Vote for us!

If you like this script, please vote for it. We do appreciate this much.
Jan´s Script Portal: 
CGI Resource index: 


All copyrights to HitsLog script are exclusively owned by the author - Irnis Haliullin.

This script is Freeware, you may use this product free of charge.


If you have any questions or suggestions about HitsLog script, please contact by mail to

 Quick Menu    
AccuHash 2.0
Advanced CheckSum Verifier
Google PageRank for Delphi
Alpha Clock
Golden Phrases
Google ToolBar Buttons
eXpress CheckSum Verifier
eXpress CheckSum Calculator
eXpress TimeStamp Toucher
eXpress FreshFiles Finder
eXpress IP Locator
eXpress PageRank Revealer
WinBZip2 utility
WinGZip utility
HitsLog script

© 2001 Irnis Haliullin    Last modified: Октябрь 06, 2020 

Valid HTML 4.01!Valid CSS!