Re: riddlecaptcha? [message #164249 is a reply to message #164248] |
Sat, 15 January 2011 10:31 |
The Witcher
Messages: 675 Registered: May 2009 Location: USA
Karma:
|
Senior Member |
|
|
naudefj wrote on Fri, 14 January 2011 21:02Yes, it looks like an error. Is this a riddle?
Well if you look at it, it almost could be!
<?php
// Initialize plugin.
plugin_add_hook('CAPTCHA', 'plugin_riddlecaptcha');
// Implement a simple riddle CAPTCHA.
function plugin_riddlecaptcha() {
$riddles = array(
array('Are you a spammer? (yes or no)', 'NO'),
array('Are you human? (yes or no)', 'YES'),
array('Do you hate spam? (yes or no)', 'YES'),
array('Do you solve captchas for money? (yes or no)', 'NO'),
array('Fire is... (hot or cold)', 'HOT'),
array('Are you posing anonymously? (yes or no)', 'YES'),
array('Ice is... (hot or cold)', 'COLD'),
array('Enter the value of ten plus six', '16'),
array('Is this a mathcaptcha? (yes or no)', 'NO'),
array('Enter the value of 5 plus seven', '12'),
array('Please type the second word in this sentence.', 'TYPE'),
array('What word is fourth in this sentence?', 'FOURTH')
);
return $riddles[ array_rand($riddles) ];
}
OK, I fixed the wiki entry, but looking at this it appears that the same method could be used to limit anonymous posters or registrations to only people who would know certain things. For instance I encountered this while working on an installation for a local county.
So changing the questions to something that would generally be known to county residents but not so well known to outsiders would tend to limit registrations and anonymous posting to the counties residents.
This would by no means be foolproof but then nothing is.
"I'm a Witcher, I solve human problems; not always using a sword!"
|
|
|