<!DOCTYPE html>
<html>
<head>
    <title>Visitor Counter</title>
</head>
<body>

<?php
$file = "counter.txt";

if (!file_exists($file)) {
    file_put_contents($file, '0');
}

$count = (int) file_get_contents($file);
$count++;

file_put_contents($file, $count);

echo "No. of visitors: " . $count;

if ($count == 50) {
    echo "Limit reached";
}
?>

</body>
</html>