antiflood-paginas
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?
$antiflood_time = time() + 120;
$cookie = explode(",", $_COOKIE['antiflood']);
if ($cookie[1] >= 5)
{
echo "<h1>Antiflood activated</h1>";
echo "<p><b>Probeer het later opnieuw..</b></p>";
exit();
}
elseif ($cookie[0] == $_SERVER['PHP_SELF'])
{
$cookie[1]++;
setcookie("antiflood", $_SERVER['PHP_SELF'] . "," . $cookie[1], $antiflood_time);
}
else
{
setcookie("antiflood", "");
setcookie("antiflood", $_SERVER['PHP_SELF'] . ",1", $antiflood_time);
}
?>
$antiflood_time = time() + 120;
$cookie = explode(",", $_COOKIE['antiflood']);
if ($cookie[1] >= 5)
{
echo "<h1>Antiflood activated</h1>";
echo "<p><b>Probeer het later opnieuw..</b></p>";
exit();
}
elseif ($cookie[0] == $_SERVER['PHP_SELF'])
{
$cookie[1]++;
setcookie("antiflood", $_SERVER['PHP_SELF'] . "," . $cookie[1], $antiflood_time);
}
else
{
setcookie("antiflood", "");
setcookie("antiflood", $_SERVER['PHP_SELF'] . ",1", $antiflood_time);
}
?>
.. de rest van de php code of HTML ..