You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
502 B
13 lines
502 B
<?php |
|
|
|
function anti_ddos(){ |
|
|
|
if(!isset($_COOKIE['_token__']) || $_COOKIE['_token__'] != md5(date('Y-m-d-H').$_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_USER_AGENT'])) { |
|
setcookie("_token__",md5(date('Y-m-d-H').$_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_USER_AGENT']),time()+1*3600); |
|
|
|
echo '<!doctype html><html><script>window.location.reload();</script></html>'; |
|
|
|
|
|
//header("Location: https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], true, 301); |
|
} |
|
}
|
|
|