Oh, okay, let me write out a script I think should work.
<?php
function hitCounter();
{
$explodeMe = file_get_contents('hitCounts.txt');
$explosion = explode(' ', $explodeMe);
$count = 0;
while ($explosion[$count])
{
$count++;
}
$count += 1;
$openHits = fopen('hitCounts.txt', 'a+');
fwrite($openHits, This line is number ");
fwrite($openHits, $count);
fwrite($openHits, " \n");
fclose($openHits);
}
hitCounter();
?>
You'll need a seperate file to permanently hold the number of hits, and make sure it is CHMODed to 777. The file should be in the same folder as this, and it should be called "hitCounts.txt" (Case-sensitive).
php include this php file into any page you want to add to the hit counter/text file (So, if you want only hits to the index to add to the file, only include it to index.php). In case you don't know how to include a file, here is the code:
<?php
include("fileHere.php");
?>