View file code.php
<?php // by mides, 1da.su $_SESSION['checkcode'] = $rand = mt_rand(10000, 99999); $image = imagecreate(40, 15); $background_color = imagecolorallocate($image, 111, 111, 111); $color = imagecolorallocate($image, 0, 0, 0); imagestring($image, 3, 2, 1, $rand, $color); header('Content-Type: image/gif'); imagegif($image); imagedestroy($image); ?>