Documentation

SimpleContactForm.configuration.php >> << SecurityImage.configuration.php

SecurityImage.php

This file generates and outputs the captcha image used for form verification.
It is also responsible for generating the verification code.

This file requires a single GET parameter name form which should hold the name of the form this image is being generated for.
First the configuration file is loaded SecurityImage.configuration.php. If an override file exists (See forms) then that will be loaded instead.
The image colors are chosen randomly based on the configuration settings and an image is created in memory.
The background image (resources/background.png) is loaded and drawn to create some background noise.

Next the verification code is generated an rendered using the font image (resources/font.gif) then the code is stored in a session variable $_SESSION[ 'simpleCF-FORM-NAME-code' ] and the image is output using the imagejpeg GD function.

For more information on how this file works see the comments in the original source file.

SimpleContactForm.configuration.php >> << SecurityImage.configuration.php