TEKCOUNT.CGI By Metertek 1999 Metertek@yahoo.com To start script call from your browser like so : http://www.your.com/cgi-bin/tekcount.cgi?admin Instructions i) Author/User Agreement. The user by installing and therefore using this Perl script recognises that this script remains the property of the Metertek Perl Script Archive, and therefore should not be altered and/or redistributed in any way without the prior consent of the Author and the Metertek Perl Script Archive. In return the Author provides this script for your personal use free of charge and without obligation. 1. OVERVIEW TEKCOUNT.CGI will place a text based page counter on any webpage you specify. You may view all page statistics or add counters to more pages via the scripts administration screen. Tekcount.cgi is simple to set up as there are only 5 script variables and does not require SSI to work. To add a tekcounter to each page you call the script with the '?admin' query, the tekcounter installation page will then be returned to your browser. From the installation section you create the tekcounter counts file by adding tekcounters to any webpages you specify. After the initial first time installation the statistics page will then be shown for the new counter file. The installation and statistics sections are protected by checking your IP number against the list of acceptable IP numbers in the script variables section, if there is no match the script is aborted and the 'No Unauthorized Access' page will be displayed. This stops anyone except you or other authorized persons from accessing the script administration or statistics area, although obviously the script will still count other IP numbers visiting pages counted by the Tekcounter script. The IP number authorization function can be disabled in the script variables section, if enabled for your IP number, your hits to tekcounter installed webpages wont be recorded, thus giving you a true record of page visits while at the same time providing additional security against others accessing your script administration area. If the IP number authorization function is disabled others will be able to access your admin area and at the same time your own hits will be recorded as page visits to your webpages. From the statistics page you can view all of the pagehits for each webpage containing a Tekcounter or you may enter the path of a webpage you wish to install a new Tekcounter on. The script works by installing 2 Tekcounter tags into your HTML document at the and commands, these tags control the page caching characteristics (Netscape Browsers) and the counter placement, usually at the bottom of your HTML page. 2. INSTALLATION Change the script variables to suit your requirements and copy the script to your cgi-bin with the filename tekcount.cgi. Copy the image file "tekcount.gif" into your main web directory. Nothing else to do - TEKCOUNT.CGI will create the necessary counter file when initialized upon first use. 3. TEKCOUNT.CGI VARIABLES $countfile = '/home/www/yourdir/logs/tekcount.txt' : path to counter file $imageurl = 'http://your.server.com/yourdir/tekcount.gif' : url of image file $textcolor = '#000080' : color of tekcounter text $restrictip = '0' : set to 1 to restrict access to admin area @acceptip = ("127.0.0.1","203.78.23.14") : Insert your own IP numbers here to enable your access to the tekcount.cgi admin section - only valid if $restrictip = '1'. 4. FEEDBACK Feel free to send any comments or suggestions as feedback is encouraged, Email Metertek at metertek@yahoo.com 5. FOOTNOTE All Metertek scripts are provided free for use but remain the property of the Metertek Script Archive and the Author. Any Distribution of files downloaded from the Metertek Perl Script Archive either in part or in any way edited from the original format shall be in violation of the Author/User agreement.