codeigniter CAPTCHA Helper create_captcha($data)


Example

Takes an array of information to generate the CAPTCHA as input and creates the image to your specifications, returning an array of associative data about the image.

[array]
(
  'image' => IMAGE TAG
  'time'    => TIMESTAMP (in microtime)
  'word'    => CAPTCHA WORD
)

The "image" is the actual image tag:

<img src="http://example.com/captcha/12345.jpg" width="140" height="50" />

The "time" is the micro timestamp used as the image name without the file extension. It will be a number like this: 1139612155.3422

The "word" is the word that appears in the captcha image, which if not supplied to the function, will be a random string.