search
HomeCMS TutorialDEDECMSWhat to do if dedecms maliciously registers and posts advertising articles

What to do if dedecms maliciously registers and posts advertising articles

dedecms What should I do if I register maliciously and post advertising articles?

If your website is suffering from spam membership registrations and mass advertising articles, then congratulations, you can almost be quiet with just one trick!

Recommended study: 梦Weavercms

The specific method is: add the source judgment in the index.php and reg_new.php files under the member directory, the code is

The code is as follows:

<?php 
if( stristr ($_SERVER[&#39;HTTP_REFERER&#39;],"你的域名")) { 
原文件php代码的正文 
} 
else { 
ShowMsg(&#39;请注意,非法操作!&#39;, &#39;index.php&#39;); 
exit(); 
} 
?>

Of course, you can also modify the article_add.php and other files under member.

The meaning of this code is to determine whether the access source comes from your own website. If so, follow the original procedure to perform normal registration or login. If not, return to the member homepage. Of course. You can also change it to the homepage of your website.

The above is the detailed content of What to do if dedecms maliciously registers and posts advertising articles. 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 Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

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.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft