Home

Awesome

VisualCaptcha Spark

A drag and drop alternative to the traditional text based Captcha

This is a Spark version of the Captcha alternative from http://visualcaptcha.net

VisualCaptcha is the easiest to implement secure Captcha with images instead of text and drag & drop capabilities (and mobile-friendly).

VisualCaptcha Spark

Installation

  1. Install Spark
  2. Copy, link or move the files in spark/visualcaptcha/*version*/views/images/ to your publicly available images directory in your Codeigniter install.
  1. Update spark/visualcaptcha/*version*/config/visualcaptcha.php
  1. You are good to go using the default settings. Feel free to look in the config and the code for other settings, as well as use your own images or css for the display.

Note

Usage

To display the Captcha:

Load the Spark in your View and call:

$visualCaptcha = new visualcaptcha($formId, $type);
$visualCaptcha->show();

where:
	$formId is the id/name of your form. 
	$type is 'h' for a horizontal layout or 'v' for the vertical layout.
To validate the response of the Captcha:

Load the Spark in your Controller and call:

$visualCaptcha = new visualcaptcha($formId, $type);
$visualCaptcha->isValid();  // returns bool

where:
	$formId is the id/name of your form. 
	$type is 'h' for a horizontal layout or 'v' for the vertical layout.

Example

Display:
$this->load->spark('visualcaptcha/0.0.1');
$visualCaptcha = new visualcaptcha("login_form", "v");
$visualCaptcha->show();
Validate:
$this->load->spark('visualcaptcha/0.0.1');
$visualCaptcha = new visualcaptcha("login_form", "v");
$vc_passed = $visualCaptcha->isValid();

Changes:

Changes made from the original VisualCaptcha in visualcaptcha-spark.0.0.1