11-29-2011, 10:55 PM
First create a "visitors.txt", and enter "0" (without quotes) in it. Then add this in a php file.
Code:
<?php
$myFile = "visitors.txt";
$fh = fopen($myFile, 'r');
$theData = fread($fh, 5);
fclose($fh);
intval($theData);
$theData = $theData + 1;
$fh = fopen($myFile, 'w') or die("Can't Open File");
fwrite($fh, $theData);
fclose($fh);
echo $theData;
?>




