[pmwiki-users] Turing Test for pmwiki
Patrick R. Michaud
pmichaud at pobox.com
Sun Jul 13 20:38:04 CDT 2008
On Sun, Jul 13, 2008 at 10:26:58PM +0200, Marcus wrote:
> Instead of an obfuscated number to fool OCR systems, let's use plain
> text questions which cannot be answered without real-world knowledge.
> This would cause a spam robot to fail the Turing test, and no amount
> of OCR advancement will change it.
FWIW, others have taken this approach but the image-based
captchas still seem to be the most prevalent -- I tend to take this
as evidence that the image-based captchas still work better.
One of the difficulties of "real-world knowledge" tests is that
much of what we know may be intimately tied to language and culture.
Still, this isn't to dismiss this approach entirely, as it may
in fact be very useful. Fortunately, the Captcha recipe is
already customizable to provide whatever questions/responses
> I started wrote some simple code to implement it in a contact form,
> which now works. However, I don't know how to integrate it into pmwiki
> like the captcha recipe. Can anybody help with that?
I've set up an example at http://www.pmwiki.org/wiki/Test/TuringCaptcha .
The local customization I used to do this is:
$CaptchasList = array(
'What day comes after Monday?' => 'Tuesday',
'What color is a green apple?' => 'green',
'What is larger, an elephant or an ant?' => 'elephant',
'What shape is a circle? It is ro...' => 'round',
$key = array_rand($CaptchasList);
$FmtPV['$Captcha'] = "'$key'";
$CaptchaValue = $CaptchasList[$key];
Of course, you can modify the above to be as simple or complex as
you wish, e.g., the challenge/responses could come from a database
or file or wherever. The important steps are to set the $Captcha
page variable to display an appropriate challenge ($key in the above),
and set the $CaptchaValue global variable to have the correct
response for that challenge. The captcha.php recipe takes
care of the rest.
I may improve the captcha.php recipe slightly to make it easier
to set the challenge without having to change the page variable
definition, but even if I do that the above should continue to work.
Hope this helps, and thanks!
More information about the pmwiki-users