dedecms 防恶意注册方法
最近网站遇到注册机的问题,如何避免呢?
在member/reg_new.php下找到
if($dopost==’regbase’)
{
______________________________________________________________________
if($reg_ha != ‘爱文学网’)
{
ShowMsg(‘请正确输入本网站名,本网站名为<font color=red><b>爱文学网</b></font>’,’-1′);
exit();
}
_______________________________________________________________________
$svali = GetCkVdValue();
if(preg_match(“/1/”, $safe_gdopen)){
if(strtolower($vdcode)!=$svali || $svali==”)
{
ResetVdValue();
ShowMsg(‘验证码错误!’, ‘-1’);
exit();
}
}
在member/templets/reg_new.htm下找到
__________________________________________________________________________________
<li><span>随机问题:</span> <input type=”text” class=”intxt w200″ style=”width: 100px;” name=”reg_ha” size=”25″ maxlength=”15″ value=”请输入本网站名
” onfocus=”if (this.value==’请输入本网站名’)this.value=”” onblur=”if (this.value==”)this.value=’请输入本网站名'”> <i>*</i> <em
id=”_reg_answer”>本网站名为:<font color=red><b>爱文学网</b></font>(请将<font color=red><b>爱文学网</b></font>输入到左边文本框</em>中)</li>
<li><span>验证码:</span>
__________________________________________________________________________________
<input type=”text” style=”width: 50px; text-transform: uppercase;” id=”vdcode” name=”vdcode”/><img id=”vdimgck”
align=”absmiddle” onclick=”this.src=this.src+’?'” style=”cursor: pointer;” alt=”看不清?点击更换” src=”../include/vdimgck.php”/> 看不清? <a href=”javascript:void(0)” onclick=”changeAuthCode();”>点击更换</a></li>
问题答案可以随便写
只要两个文件里的答案保持一致就OK了