J2TEAM Security: A must-have extension for Chrome users. Install now!

Simple PHP Script Anti Flood DDoS

Simple PHP Script Anti Flood DDoS | Juno_okyo's Blog
http://yorktown.cbe.wwu.edu/sandvig/mis314/lectures/images/PhpScript.png

<?php
//
// Description : Script anti flood
// Version      : 0.0.1
// Auteur       : Atmoner
// Url          : http://httpscript.org
//
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: http://junookyo.blogspot.com/");
    exit;
}
$_SESSION['last_session_request'] = time();
?>

Leader at J2TEAM. Website: https://j2team.dev/

Đăng nhận xét

Cảm ơn bạn đã đọc bài viết!

- Bạn có gợi ý hoặc bình luận xin chia sẻ bên dưới.

- Hãy viết tiếng Việt có dấu nếu có thể!