<?php
if ( $useSecurity )
{
my ( $image_data, $mime_type, $random_number ) = GD::SecurityImage->new->random->create(undef,undef,[0,0,0], [200,200,200])->out( 'force' => 'jpeg' );
$system->set_cookie( 'security_code', crypt $random_number, substr $random_number, 0 , 2 );
$content_type = "image/$mime_type";
$html = $image_data;
}
else
{
$system->error ( "GD::SecurityImage is not installed" );
}
?>