PHP Classes

File: captcha.config.php

Recommend this page to a friend!
  Classes of workonphp   CAPTCHA by Anchal   captcha.config.php   Download  
File: captcha.config.php
Role: Configuration script
Content type: text/plain
Description: Captcha Config Class
Class: CAPTCHA by Anchal
Generate and validate CAPTCHA images
Author: By
Last change:
Date: 15 years ago
Size: 2,420 bytes
 

Contents

Class file image Download
<?php
//Change these settings to change the way the captcha generation works and match your server settings

//Folder Path (relative to this file) where image files can be stored, must be readable and writable by the web server
//Don't forget the trailing slash
$tempfolder = 'temp/';

//Folder Path (relative to this file) where your captcha font files are stored, must be readable by the web server
//Don't forget the trailing slash
$TTF_folder = 'fonts/';

//The minimum number of characters to use for the captcha
//Set to the same as maxchars to use fixed length captchas
$minchars = 5;

//The maximum number of characters to use for the captcha
//Set to the same as minchars to use fixed length captchas
$maxchars = 5;

//The minimum character font size to use for the captcha
//Set to the same as maxsize to use fixed font size
$minsize = 20;

//The maximum character font size to use for the captcha
//Set to the same as minsize to use fixed font size
$maxsize = 20;

//The maximum rotation (in degrees) for each character
$maxrotation = 0;

//Use background noise instead of a grid
$noise = false;

//Use web safe colors (only 216 colors)
$websafecolors = FALSE;

//Enable debug messages
$debug = FALSE;

//Filename of garbage collector counter which is stored in the tempfolder
$counter_filename = 'captcha_counter.txt';

//Prefix of captcha image filenames
$filename_prefix = 'captcha_';

//Number of captchas to generate before garbage collection is done
$collect_garbage_after = 1;

//Maximum lifetime of a captcha (in seconds) before being deleted during garbage collection
$maxlifetime = 600;

//Make all letters uppercase (does not preclude symbols)
$case_sensitive = FALSE;

//////////////////////////////////////////
//DO NOT EDIT ANYTHING BELOW THIS LINE!
//
//

//$folder_root = substr(__FILE__,0,(strpos(__FILE__,'.php')));
$folder_root = '.';

$CAPTCHA_CONFIG = array('tempfolder'=>$folder_root.'/'.$tempfolder, 'TTF_folder'=>$folder_root.'/'.$TTF_folder, 'minchars'=>$minchars, 'maxchars'=>$maxchars, 'minsize'=>$minsize, 'maxsize'=>$maxsize, 'maxrotation'=>$maxrotation, 'noise'=>$noise, 'websafecolors'=>$websafecolors, 'debug'=>$debug, 'counter_filename'=>$counter_filename, 'filename_prefix'=>$filename_prefix, 'collect_garbage_after'=>$collect_garbage_after, 'maxlifetime'=>maxlifetime, 'case_sensitive'=>$case_sensitive);

?>