captcha

bg = array( 0, 0, 0 );

//Generate a random word for CAPTCHA.
$word = $captcha_instance->generate_random_word();

//Generate an image file and a corresponding text file in the temporary directory.
$prefix = mt_rand();
$captcha_instance->generate_image( $prefix, $word );

//Then, show the image and get an answer from respondent.
//Check the correctness of the answer.

$correct = $captcha_instance->check( $prefix, $the_answer_from_respondent );
//If the $correct is true, go ahead. Otherwise, block the respondent — as it would appear not to be human.
//And last, remove the temporary image and text files, as they are no longer in use.

$captcha_instance->remove( $prefix );

?>