


Detailed explanation of how to prevent the dedecms website from being attacked by DDos
This article mainly introduces relevant information on how to prevent DDos attacks on the dedecms website. The editor thinks it is quite good, so I will share it with you now and give it as a reference.
Step one: Enter the background, system-》Add new variable Variable name: cfg_anquan_cc
Variable type: Boolean (Y /N) (Recommended learning: dedecms tutorial)
Parameter description: Whether to enable anti-CC attacks:
Variable value: Y
Step 2: Edit, /member/config.php and add code under require_once(DEDEINC.'/dedetemplate.class.php');
if($cfg_anquan_cc == 'Y'){<br/>//php防CC攻击 在3秒内连续刷新页面5次以上将指向本机 //www.jb51.net/404.htm<br/> <br/>$P_S_T = $t_array[0] + $t_array[1];<br/>$timest amp = time();<br/>session_start();<br/>$ll_nowtime = $timestamp ;<br/>if (session_is_registered('ll_lasttime')){<br/>$ll_lasttime = $_SESSION['ll_lasttime'];<br/>$ll_times = $_SESSION['ll_times'] + 1;<br/>$_SESSION['ll_times'] = $ll_times;<br/>}else{<br/>$ll_lasttime = $ll_nowtime;<br/>$ll_times = 1;<br/>$_SESSION['ll_times'] = $ll_times;<br/>$_SESSION['ll_lasttime'] = $ll_lasttime;<br/>}<br/>if (($ll_nowtime - $ll_lasttime)<3){<br/>if ($ll_times>=5){<br/>header(sprintf("Location: %s",'//www.jb51.net/404.htm'));<br/>exit;<br/>}<br/>}else{<br/>$ll_times = 0;<br/>$_SESSION['ll_lasttime'] = $ll_nowtime;<br/>$_SESSION['ll_times'] = $ll_times;<br/>}<br/>}<br/>
The above is the detailed content of Detailed explanation of how to prevent the dedecms website from being attacked by DDos. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

WebStorm Mac version
Useful JavaScript development tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
