Proszę o rady.

class captcha { { } { self::set(); $_SESSION["captcha"] = self::$string; self::create(); } { $string = $_SESSION["captcha"]; self::$image = imagecreatefromjpeg ( 'captcha.jpg' ); $text_color = imagecolorallocate(self::$image, 130, 130, 130); imagettftext(self::$image, 15, 0, 20, 27, $text_color, self::$font, $string); imagepng(self::$image); imagedestroy(self::$image); } { switch ( self::$type ) { case 'random': for ( $i = 0; $i < 5; $i++ ) { } self::$string = $string; break; case 'word': /* nie dziala */ break; } } }