Text Counter
This is an ASP test file. This file includes a counter. The counter is a program written in ASP. Each time a new visitor enters the page the counter increments. The count is shown to you as text. Hitting reload will not increment the counter for that session (for that user during the same visit).
The counter.asp file creates and uses two text files
1. counter.txt - which holds the accumulated counts
2. HitLog.Log - which holds a record for each hit
In addition the first hit on Sunday copies the current hit log file to an archive file and starts a new hit log file.
A line in counter.txt looks like this: 35514|34236|1|34236|2000|
From left to right the sections of the line are: 1)Total Count 2)Count at start of year - or at start 3)Current month 4)Count at start of month 5)Current Year.
Yours is visit number 0. Thank you.
Visits: 0 this month, 0 this year.
Code in calling page
The code below is placed in the ASP page at the location where you want the counter.
You can look at a display of the log at Hit Log Display This uses the ASP program CounterLogSum.Asp.<p align="center"> <% ShowWhat = "True" PageName = "Index.Asp" %> <!-- #include file="./counterKCD.asp" --> <p><font face="Arial,Helvetica,Verdana" color="#0000ff"> Yours is visit number <%= ThisTotal %>. Thank you.</font><br> <font size=-1 face="Arial,Helvetica,Verdana"> Visits: <%= ThisMonth %> this month, <%= ThisYear %> this year.</font></p>