0) $return .= $string[rand(0, strlen($string) - 1)]; return $return; } $text = random_string(8); $_SESSION['NUM'] = sha1($text); $image = @imagecreatefrompng('image.png'); $text_color = @imagecolorallocate($image, 0, 0, 0); for($i = 0; $i < strlen($text); $i++) @imagestring($image, 5, 35 + ($i*10), round(rand(15,25)), $text[$i], $text_color); @imagepng($image); @imagedestroy($image); ?>