Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //
- // Description : Script anti flood
- // Version : 0.0.1
- // Auteur : Atmoner <http://atmoner.com/>
- // Url : http://atmoner.com/script-anti-flood-php/
- //
- if (!isset($_SESSION)) {
- session_start();
- }
- // anti flood protection
- if($_SESSION['last_session_request'] > time() - 2){
- // users will be redirected to this page if it makes requests faster than 2 seconds
- header("location: /flood.html");
- exit;
- }
- $_SESSION['last_session_request'] = time();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement