<?
require_once('captcha.class.php');
$ca = new DeaCaptcha();
//---------------------------------------------------
//set captcha
// set image in frame
$ca->setImgFrame(1);
//---------------------------------------------------
// set number of char in word; default randomize (5,8)
//$ca->setNumString(5);
//---------------------------------------------------
// set crypt word
// use crypt file
$ca->setCryptFile('file.csv');
// use array of char
// use nothing default numbers (0..9)
//$ca->setCryptBase('ABCDEFGHIJKLMNOPQRSTUVWXYZ');
//$ca->setCryptBase('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789');
//$ca->setCryptBase('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789');
//---------------------------------------------------
// set width and height image; default w=150 h=60
//$ca->setWidth(150);
//$ca->setHeight(60);
//---------------------------------------------------
// set background image
// use some image with path or array of image (first param)
// second param (s=stretch,t=tile or nothing; default stretch)
// delim between param is ';'
$ca->setImageName('image/mda.png;s,image/bda.png;t');
//---------------------------------------------------
// set patern
// use P=point,L=line,C=circle,E=elipse,CF=fillcircle,EF=fillelipse;T=text
$ca->setPaternType('p,l,c,e,cf,ef,t');
$ca->setPaternRandColor(1);
//---------------------------------------------------
// set font
// set randomize font if set array of fonts
$ca->setFontRand(1);
// set some font with path or array of font or nothing
// use true type font (.ttf) or graphics data format (.gdf)
$ca->setFontName('font/gilligan.ttf,font/arialbd.ttf');
//$ca->setFontName('font/04b.gdf,font/automatic.gdf);
// set randomize color for each char in word
$ca->setFontRandColor(1);
// set shadow on word
$ca->setFontShadow(1);
//---------------------------------------------------
//create captcha
$ca->create_captcha();
//---------------------------------------------------
$_SESSION['key'] = $ca->crypt;
//---------------------------------------------------
// show captcha
$ca->show_carp($ca->image);
?>