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(); } ?>
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!