ecabrera Posted August 26, 2011 Share Posted August 26, 2011 why does this not display my hosting supports gd <?php session_start(); create_image(); function create_image() { $rand = md5(rand(0, 9999999)); $vaule = substr ($rand, 10, ; //widht and height is the width of the box $width = 150; $height = 30; //the will be ther sixe of the box $image = imagecreate($width, $height); $black = imagecolorallocate($image, 0, 0, 0); $white = imagecolorallocate($image, 255, 255, 255); $grey = imagecolorallocate ($image, 132, 132, 132); $blue = imagecolorallocate ($image, 138, 197, 255); //the bg of the image imagefill($image, 0, 0, $blue); //imagetext imagestring($image, 5, 15, 7, $vaule, $black); //middle line and down line imageline($image, 0, $height/2, $width, $height/2, $grey); imageline($image, $width/2, 0, $width/2, $height, $grey); //hor line image($image, 0, 0, $width, $height, $grey); image($image, 0, $height, $width, 0, $grey); //desplay image imagepng($image); imagedestroy($image); //start session $_SESSION[captcha_key]; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/245735-captcha/ Share on other sites More sharing options...
voip03 Posted August 26, 2011 Share Posted August 26, 2011 Your calling undefined function image() //hor line image($image, 0, 0, $width, $height, $grey); image($image, 0, $height, $width, 0, $grey); Quote Link to comment https://forums.phpfreaks.com/topic/245735-captcha/#findComment-1262140 Share on other sites More sharing options...
ecabrera Posted August 26, 2011 Author Share Posted August 26, 2011 thanks i think i got the problem now //hor line imageline($image, 0, 0, $width, $height, $grey); imageline($image, 0, $height, $width, 0, $grey); Quote Link to comment https://forums.phpfreaks.com/topic/245735-captcha/#findComment-1262143 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.