diff options
| author | David Aspinall | 1999-06-30 13:50:48 +0000 |
|---|---|---|
| committer | David Aspinall | 1999-06-30 13:50:48 +0000 |
| commit | 35642157dc5b17bb06f803189ab9c7dff01c7425 (patch) | |
| tree | 77090a2927e11d2db14c87ab82b4dc255a3ecbe9 /html/hits.phtml | |
| parent | af6dbb36ead642ca9ea346fbb6ac18d980280704 (diff) | |
Simple hit counter
Diffstat (limited to 'html/hits.phtml')
| -rw-r--r-- | html/hits.phtml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/html/hits.phtml b/html/hits.phtml new file mode 100644 index 00000000..6d5c2be6 --- /dev/null +++ b/html/hits.phtml @@ -0,0 +1,26 @@ +<?php + $counterFile = "counter.txt"; + $counterStart = "counterstart.txt"; + $maxlen=10; + require('functions.php3'); + small_header("Hit counter"); + print "<p>"; + if (is_readable($counterFile)) { + print "These pages have been accessed "; + readfile($counterFile); + print " times "; + if (is_readable($counterStart)) { + $fp=fopen($counterStart,"r"); + $start=fgets($fp,20); + print "since "; + print strftime("%d %B %Y",$start); + print ".\n"; + } else { + print "<br>\n(could not access time stamp file $counterStart)\n"; + }; + } else { + echo "Could not access hit counter file $counterFile\n"; + }; + print "</p>"; + footer(); +?> |
