mirror of
https://github.com/FranP-code/Visit-counter.git
synced 2025-10-12 23:52:54 +00:00
20 lines
350 B
PHP
20 lines
350 B
PHP
<?php
|
|
|
|
$visitas = htmlspecialchars($_POST['visitas']);
|
|
|
|
function backToLife() {
|
|
header('Location: ./definer.html');
|
|
}
|
|
|
|
if (!isset($visitas)) {
|
|
backToLife();
|
|
}
|
|
|
|
if ($visitas >= 0 && $visitas <= 9999) {
|
|
file_put_contents('./visits.txt', $visitas - 1);
|
|
header('Location: ./index.php');
|
|
} else {
|
|
backToLife();
|
|
}
|
|
|
|
?>
|