font, $code) or die('Error in imagettfbbox function'); $x = ($width - $textbox[4])/2; $y = ($height - $textbox[5])/2; imagettftext($image, $font_size, 0, $x, $y, $text_color, $this->font , $code) or die('Error in imagettftext function'); /* output captcha image to browser */ header('Content-Type: image/jpeg'); imagejpeg($image); imagedestroy($image); } } $width = isset($_GET['width']) ? $_GET['width'] : '120'; $height = isset($_GET['height']) ? $_GET['height'] : '40'; $code = isset($_GET['code']) ? $_GET['code'] : ''; if (isset($_GET['code'])) { $captcha = new CaptchaSecurityImages(); $captcha-> GenerateImage($width,$height,wpf_str_decrypt($code)); }