Recent Topics

1 Feb 07, 2006 06:34    

Hey i was fidling with antispam ideas and would this work, i think it might...

<form action="http://google.com">
<input type="text" disabled="disabled" name="AntiSpam_TXT" id="AntiSpam_TXT" value="ERROR" size="2">
<input type="text" name="AntiSpam_USR" id="AntiSpam_USR" value="" size="2">
<script language="javascript" type="text/javascript">
	var text = String("");
	while(text.length < 5){
		var num = Math.random()*9;
		num		= Math.round(num);
		text	+= String(num);
	}
	document.getElementById("AntiSpam_TXT").value = text;
	
	function AntiSpamCompare(){
		if(document.getElementById("AntiSpam_TXT").value == document.getElementById("AntiSpam_USR").value)
			return true;
		else
			return false;
	}
</script>
<input name="submit" type="submit" tabindex="5" value="Send comment" onclick="return AntiSpamCompare()" />
</form>

But of course u would have the compare in php.....
Hmmm but even if it is in php the robot just makes those equal the same values....

I dunno...

2 May 04, 2006 23:08

I think you should keep your blog accessible without javascript turned on, for blind people for example. You can do so quite easy: generate two integers (below 100 for example) and put them somewhere in your form as hidden fields. Create a third field: if javascript is enabled, it should be hidden and javascript should fill in the sum of the two integers. If javascript is disabled, the field should be a simple textfield next to the question to fill in the sum of the two given integers. So a human can simply calculate the sum and fill it in without javascript enabled. PHP should just check if the two given integers are actually the correct ones given by PHP itself, and check if the third one is the sum of the two previous ones.

3 May 05, 2006 04:04

quote from;
http://forums.b2evolution.net//viewtopic.php?p=36104#36104
balupton wrote:

I proposed this here;
http://forums.b2evolution.net//viewtopic.php?t=7053

The above one will not work as most bots do not run by clicking submit, they work by getting the form values and then submitting a form to wherever it needs to go.

You will also have compatiability issues with users that do not have javascript enabled.

But i think this [no website] method is quite good.


Form is loading...