span style="color: #0000BB"><?php//session_start();define('X', rand(1000, 9999));define('Y', rand(1000, 9999));$quest = rand(0, 1) ? 'min' : 'max';define('CAPTCHA', $quest(X, Y));//$_SESSION['CAPTCHA'] = CAPTCHA;define('STR1', 'Write ' . $quest);define('STR2', X . ' ' . Y);$image = imageCreateTrueColor(100, 40);imageFill($image, 0, 0, imageColorallocate($image, 100, 100, 100));imageString($image, 5, 10, 3, STR1, imageColorallocate($image, 0, 0, 0));imageString($image, 5, 10, 20, STR2, imageColorallocate($image, 0, 0, 0));header('Content-Type: image/jpeg;');imagejpeg($image, null, 100);?> |