Integrating Captcha with MediaWiki

PCQ Bureau
New Update

Captcha, also known as Completely Automated Public Turing test, is a program

used to distinguish between a human and a bot. You might have used Captcha while

filling an online form or posting comments on a blog. Just to refresh your

memory, these are images containg numbers or words that you are asked to enter

in a box. This is to verify that a human is filling the form and not a bot. The

captcha images are designed in such a way that it is hard for computer programs

to read them. Captchas are used to preventing against bots registering on a

website, protecting spam comments in blogs, preventing brute force attacks on a

website to bypass authentication, etc. reCAPTCHA is one such captcha provider,

which we will talk about in this article.

Humans solve around 60 million CAPTCHAs every day and so reCAPTCHA decided to
utilize such efforts to the process of digitizing books. These books are first

scanned and photographic images are then changed into text through OCR. Now OCR

doesn't read all images, so somebody needs to enter them. reCAPTCHA sends these

words as captcha images to users. To ensure proper authentication, correct

answers of first word of reCAPTCHA are known, while OCR cannot read correctly

the second word.


Direct Hit!

Applies To: Webmasters

Price: Free

USP: Deploying Captcha to protect your
MediaWiki against spam

Primary Link:

Google Keywords: Captcha,Mediawiki

Using reCAPTCHA with MediaWiki

To get started you need to acquire Public and Private Keys from reCAPTCHA's

website. To do this, simply register your domain name on reCAPTCHA's website and

it will automatically generate keys for you.

In reCAPTCHA, you are asked to

enter two words for authentication unlike other captchas.

Once you have acquired the keys from reCAPTCHA's website, download its

Mediawiki extension from com/p/recaptcha /downloads/list?q=MW-Latest.

Now simply unzip this file and upload it to extensions directory of Mediawiki.

Now open MediaWiki's LocalSettings.php file and add following lines to it.



$recaptcha_private_key = ' ';

$recaptcha_public_key = ' ';

Here between single codes enter Public and Private Key which you acquired

earlier from reCAPTCHA's website. Now open 'Create account page' of MediaWiki.

You will see a reCAPTCHA image with the create account form. In case a user

cannot see the image, he can click on 'Get an Audio challenge' and it will play

an audio file, which will have eight numbers. The users will be asked to enter

those numbers. reCAPTCHA also comes with plug-ins for Joomla, phpBB and other

applications which can be found on its website.