<?php
//The following line opens the file:
$fp=fopen("./sideboxes/acc.txt","r");
//The following line gets the last count of visitors:
$count=fgets($fp,1024);
//The following line closes the file:
fclose($fp);
$fw=fopen("./sideboxes/acc.txt","w");
//The following line adds 1 to the count:
$cnew=$count+1;
//The following line writes the counter back to the log file (acc.txt):
$countnew=fputs($fw,$count+1);
//The follwing line shows the count:
echo "<center><b>$cnew</b></center>";
//The following line closes the file:
fclose($fw); 
?>