slscart logo

slscart reCAPTCHA Basics

This article describes captcha, a spam control, and an alternative (improvement) called reCAPTCHA.

Why captcha?

captcha, and other methods, are used to prevent automated programs (bots) from filling out forms on a website and submitting them with false information.

What is captcha?

A CAPTCHA (a backronym for "Completely Automated Public Turing test to tell Computers and Humans Apart") is a type of challenge-response test used in computing to determine whether or not the user is human. Usually distorted numbers and or letters are displayed and the user must enter them in a text box.

What is recaptcha?

The weakness in captcha is that character recognition software (OCR) can nearly read all captcha images. recaptcha supplies hard to read images for OCR. Currently, reCAPTCHA uses a set of images and the user selects a few of them (for example, 9 images show up and the user needs to choose all images that have grass in them). reCAPTCHA is

How do I get it working?

First get the site key and secret key (the API keys) from Google.

Sign into your Google gmail account and go here.

Register your store's website.

Version 10.? and later

Under Administration > Extras

* Set 'Use Captcha' to Yes

* Enter in site key in the Public key: field

* Enter in secret key in the Private key: field

Click 'Update Variables' button to save changes.

Version 10.? and earlier

Edit your config file and add the following lines at the bottom just before ?>

define('SLC_USE_CAPTCHA', true);
define('SLC_RECAPTCHA_SITE_KEY', 'put your site key here');
define('SLC_RECAPTCHA_SECRET_KEY', 'put your secret key here');

Enter your site key and secret key where indicated.

Test it out

Click on Contact Us in the store. You will see the reCAPTCHA addition as shown below:

slscart Contact Us with reCAPTCHA

I have had much better luck using reCAPTCHA than regular captcha.


Wikipedia reCAPTCHA - describes in detail what is reCAPTCHA.