It looks like you're new here. If you want to get involved, click one of these buttons!
<?php
$count = ("counter.txt");
//now this is where we open the file
$visits = file($count);
//this adds 1 hit
$visits[0]++;
//Now open the counter
$fp = fopen($count , "w");
//put the new count value into the txt file
fputs($fp , "$visits[0]");
//close the file
fclose($fp);
//display the count
echo $visits[0];
?>
<?php
include ("counter.php");
?>
Comments