<?php

$bestand = "bestandbezoekers.php";

if(!is_file($bestand))
{
    $fp = fopen($bestand, 'a');
    fwrite($fp, "<?\\n//");
    fclose($fp);
    chmod($bestand, 0666);
}

$con = file_get_contents($bestand);
$st = substr_count($con, ";");

if(strpos($con, $_SERVER['REMOTE_ADDR']) === FALSE)
{
    $fp = fopen($bestand, 'a');
    fwrite($fp, $_SERVER['REMOTE_ADDR'].";");
    fclose($fp);
    $st++;
}

unset($con);

echo "You are visitor number " . $st;

?> 