2012-05-06 174 views
0

我真的在我的antibot接觸形式使用該但是還是我收到郵件噸的:Antibot垃圾郵件防護

<script type="text/javascript"> 
var a = Math.ceil(Math.random() * 10); 
var b = Math.ceil(Math.random() * 10);  
var c = a + b 
function DrawBotBoot() 
{ 
document.write("Antibot "+ a + " + " + b +" = "); 
document.write("<input id='BotBootInput' type='text' maxlength='2' size='2'/>"); 
}  
function ValidBotBoot(){ 
    var d = document.getElementById('BotBootInput').value; 
    if (d == c) return true;   
    return false; 

} 
</script> 

有人可以幫助我,使這個索要讓說,「什麼是今年「或類似的東西? 謝謝

+2

這是用JavaScript編寫的。大多數機器人不執行甚至不查看JavaScript,這是它被破壞的原因;他們只是提交沒有JS的表單來阻止它。 – Bojangles

+0

使用[reCaptcha](http://www.google.com/recaptcha) – Neysor

+5

*嘆*一直驗證你的東西在服務器端... – PeeHaa

回答

1

使用CAPTCHA來保護自己免受機器人的攻擊。像reCaptcha這樣的東西將滿足您的需求。它將大大減少表單中垃圾郵件的數量。

+0

好的,謝謝。我想我會用reCaptcha – Goro