file_insert.php
<?php
$IP="../blacklist/" . $_SERVER['REMOTE_ADDR'];
if (file_exists($IP)) {
header("Location: ../gia_presente.html");
} else {
$file = fopen($IP, 'w');
fclose($file);
header("Location: ../inserito.html");
}
?>
file_remove.php
<?php
$IP="../blacklist/" . $_SERVER['REMOTE_ADDR'];
if (file_exists($IP)) {
unlink($IP);
header("Location: ../rimosso.html");
} else {
header("Location: ../non_presente.html");
}
?>
Proprietà-Esperto-HEAD della pagina test.php
<?php
$IP="blacklist/" . $_SERVER['REMOTE_ADDR'];
if (file_exists($IP)) {
echo '<meta http-equiv="refresh" content="0;url=halt.html" />';
exit;
}
?>