blob: 6d5c2be644dd7a12664a8edcf27c657755fdc1bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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();
?>
|