|
Adding Counters to Your Web Pages
Creating a Daily Counter To include a daily counter to any of your web pages:
- Rename your web page so that its file extension is html-ssi
for example, rename default.html to default.html-ssi
- Add the following directive to your web html text (code):
You are visitor number <!--#daycnt--> today.
That's all there is to it!
The next time your web page is accessed, the server will replace the directive
<!--#daycnt--> with the number "1" since it will be the first access for the day. Thereafter, the count will be incremented for each access. The first time the page
is accessed after midnight local time, the counter will reset to "0". To remember the count, the server creates a file called, in this example, default.html-ssi.ctr
within the directory your web page is located. It uses this to keep track of the access count even if our servers are reset or stopped for maintanance.
Creating a Total Visitor Counter
To include a total visitor counter to your web pages:
- Rename your web page so that its file extension is html-ssi
for example, rename default.html to default.html-ssi
- Add the following directive to your web html text (code):
You are visitor number <!--#totcnt--> since <!--lastzero-->.
That's all there is to it!
The next time your web page is accessed, the server will replace the directive
<!--#daycnt--> with the number "1" and <!--#lastzero--> with the current date/time. Thereafter, the count will be incremented for each access, and the date/time will
remain the same. To remember the count and creation time, our server creates a file called, in this example, default.html-ssi.ctr within the directory your web page
is located. It uses this to keep track of the access count even if our servers are reset or stopped for maintanance.
|