search
HomeCMS TutorialDEDECMSDetailed 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.

Detailed explanation of how to prevent the dedecms website from being attacked by DDos

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 == &#39;Y&#39;){<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(&#39;ll_lasttime&#39;)){<br/>$ll_lasttime = $_SESSION[&#39;ll_lasttime&#39;];<br/>$ll_times = $_SESSION[&#39;ll_times&#39;] + 1;<br/>$_SESSION[&#39;ll_times&#39;] = $ll_times;<br/>}else{<br/>$ll_lasttime = $ll_nowtime;<br/>$ll_times = 1;<br/>$_SESSION[&#39;ll_times&#39;] = $ll_times;<br/>$_SESSION[&#39;ll_lasttime&#39;] = $ll_lasttime;<br/>}<br/>if (($ll_nowtime - $ll_lasttime)<3){<br/>if ($ll_times>=5){<br/>header(sprintf("Location: %s",&#39;//www.jb51.net/404.htm&#39;));<br/>exit;<br/>}<br/>}else{<br/>$ll_times = 0;<br/>$_SESSION[&#39;ll_lasttime&#39;] = $ll_nowtime;<br/>$_SESSION[&#39;ll_times&#39;] = $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!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

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

Atom editor mac version download

The most popular open source editor

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

MinGW - Minimalist GNU for Windows

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

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft