'255', 'g'=>'255', 'b'=>'255'); } if(isset($_GET['captchatextcolor'])) { $captchatext_rgb = dodoscaptcha_hextorgb($_GET['captchatextcolor']); } else { $captchatext_rgb = array('r'=>'0', 'g'=>'0', 'b'=>'0'); } // create a 50*20 image $captcha_im = imagecreate(50, 20); // white background and black text $captcha_bg = imagecolorallocate($captcha_im, $captchabg_rgb[r], $captchabg_rgb[g], $captchabg_rgb[b]); $captcha_textcolor = imagecolorallocate($captcha_im, $captchatext_rgb[r], $captchatext_rgb[g], $captchatext_rgb[b]); // write the string at somewhat center imagestring($captcha_im, 4, 6, 2, $_SESSION['captcharand_string'], $captcha_textcolor); // output the image header("Content-type: image/jpeg"); imagejpeg($captcha_im); ?>