<?php
$file = "/tmp/site_visits.txt";
$count = 0;
if (file_exists($file)) {
    $count = (int)file_get_contents($file);
}
$count++;
file_put_contents($file, (string)$count);
echo "document.write(\"" . $count . "\")";
