Home CMS Tutorial DEDECMS What to do if dedecms maliciously registers and posts advertising articles

What to do if dedecms maliciously registers and posts advertising articles

Dec 21, 2019 am 10:20 AM
dedecms

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['HTTP_REFERER'],"你的域名")) { 
原文件php代码的正文 
} 
else { 
ShowMsg('请注意,非法操作!', 'index.php'); 
exit(); 
} 
?>
Copy after login

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 of this Website
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 Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Where is the imperial cms resource network template? Where is the imperial cms resource network template? Apr 17, 2024 am 10:00 AM

Where is the imperial cms resource network template?

How to use dedecms How to use dedecms Apr 16, 2024 pm 12:15 PM

How to use dedecms

Accurate and reliable dedecms conversion tool evaluation report Accurate and reliable dedecms conversion tool evaluation report Mar 12, 2024 pm 07:03 PM

Accurate and reliable dedecms conversion tool evaluation report

How to upload local videos to dedecms How to upload local videos to dedecms Apr 16, 2024 pm 12:39 PM

How to upload local videos to dedecms

How dedecms implements template replacement How dedecms implements template replacement Apr 16, 2024 pm 12:12 PM

How dedecms implements template replacement

A simple way to learn dedecms encoding conversion function A simple way to learn dedecms encoding conversion function Mar 14, 2024 pm 02:09 PM

A simple way to learn dedecms encoding conversion function

What loopholes does dedecms have? What loopholes does dedecms have? Aug 03, 2023 pm 03:56 PM

What loopholes does dedecms have?

What does dedecms mean? What does dedecms mean? Apr 16, 2024 pm 12:48 PM

What does dedecms mean?

See all articles