Welcome to our Website
You are visitor:
$filename = "counter.txt";
@$fptr = fopen($filename, "r+");
if ($fptr == NULL) {
@$fptr = fopen($filename, "w+");
fwrite($fptr, "");
fclose($fptr);
echo "";
}
else {
$data = fread($fptr, filesize($filename));
$dataInt = (int) $data;
$dataInt++;
rewind($fptr);
fwrite($fptr, $dataInt);
fclose($fptr);
echo $dataInt;
}
?>