
Software Details
Witango reCAPTCHA Integration
A CAPTCHA is a program that can tell whether its user is a human or a computer, in this case by having the human interpret words that are visually distorted beyond the ability of computerized Optical Character Recognition system. reCAPTCHA uses words that have been scanned from old books, so the human response helps to digitize the world's libraries. This package contains a witango class file that implement the reCAPTCHA api.
Features
- A single class file supports any number of reCAPTCHA accounts, each of which is associated with a web site.
- A configuration file allows flexibile instantiation of objects using a single Witango Class file on the server.
- The full reCAPTCHA api is implemented, supporting error handling, and ssl challenges.
Description
There are these key elements:
- Configuration file: recaptcha.conf. This establishes in the domain name, and public and private keys required to use recaptcha. The file is located in the web root at /config/recaptcha.conf.
- Method: get_challenge. This method generates an HTML result comprised of a javascript/noscript snippet as a form element with the recaptcha challenge. This result is placed within a form so the submitters can assert they are humanoid. The method takes two optional parameters:
- error. This is the error message generated by check_answer.
- use_ssl. When true, this uses the recaptcha secure server to generate the challenge.
- Method: check_answer. This method uses the recaptcha server to determine whether the challenge was correctly answered, and returns a [1 x 2] array. The first element is a true/false response from the recaptcha server. The optional second element is a message describing the cause of the false response. Input parameters are:
- remoteip. The address of the user submitting the form.
- challenge. The challenge provided by recaptcha.
- response. The user's submittal.
- Method: challenge. This generates a basic challenge script.
Contents
- LICENSE.txt contains the LGPL license under which this software is released.
- README.html contains this descriptive content.
- Sample configuration file, recaptcha.conf
- Witango Class file, reCAPTCHA.tcf
- Sample application file, example.taf
Requirements
- Witango application server
Usage
- Download and unpack this archive.
- Copy the configuration file, recaptcha.conf, to the TCF configuration directory, conf. Important Security Note: Configure your web server to restrict access to this directory! For example, add this apache directive:
Deny from All
- Obtain keys from recaptcha, and configure recaptcha.conf.
- Copy the class file, reCAPTCHA.tcf, to a directory within your TCF search path.
- Use the methods in your application file. See the example.