Properties

$width

$width : 

Width of the image

Type

$height

$height : 

Height of the image

Type

$wordsFile

$wordsFile : 

Dictionary word file (empty for randnom text)

Type

$minWordLength

$minWordLength : 

Min word length (for non-dictionary random text generation)

Type

$transprent

$transprent : 

Type

$maxWordLength

$maxWordLength : 

Max word length (for non-dictionary random text generation)

Used for dictionary words indicating the word-length for font-size modification purposes

Type

$session_var

$session_var : 

Sessionname to store the original text

Type

$backgroundColor

$backgroundColor : 

Background color in RGB-array

Type

$colors

$colors : 

Foreground colors in RGB-array

Type

$shadowColor

$shadowColor : 

Shadow color in RGB-array or false

Type

$fonts

$fonts : 

Font configuration

  • font: TTF file
  • spacing: relative pixel space between character
  • minSize: min font size
  • maxSize: max font size

Type

$Yperiod

$Yperiod : 

Wave configuracion in X and Y axes

Type

$Yamplitude

$Yamplitude : 

Type

$Xperiod

$Xperiod : 

Type

$Xamplitude

$Xamplitude : 

Type

$maxRotation

$maxRotation : 

letter rotation clockwise

Type

$scale

$scale : 

Internal image size factor (for better image quality) 1: low, 2: medium, 3: high

Type

$blur

$blur : 

Blur effect for better image quality (but slower image processing).

Better image results with scale=3

Type

$debug

$debug : 

Debug?

Type

$imageFormat

$imageFormat : 

Image format: jpeg or png

Type

$im

$im : 

GD image

Type

$session_prefix

$session_prefix : 

Type

Methods

__construct()

__construct() 

CreateImage()

CreateImage() 

GetDictionaryCaptchaText()

GetDictionaryCaptchaText(boolean  $extended = false) : string

Random dictionary word generation

Parameters

boolean $extended

Add extended "fake" words

Returns

string —

Word

check()

check(  $captcha_code) 

Parameters

$captcha_code

del()

del(  $captcha_code) 

Parameters

$captcha_code

ImageAllocate()

ImageAllocate() 

Creates the image resources

GetCaptchaText()

GetCaptchaText() : string

Text generation

Returns

string —

Text

GetRandomCaptchaText()

GetRandomCaptchaText(  $length = null) : string

Random text generation

Parameters

$length

Returns

string —

Text

WriteText()

WriteText(  $text,   $fontcfg = array()) 

Text insertion

Parameters

$text
$fontcfg

WaveImage()

WaveImage() 

Wave filter

ReduceImage()

ReduceImage() 

Reduce the image to the final size

WriteImage()

WriteImage() 

File generation

Cleanup()

Cleanup() 

Cleanup