plodos Posted July 9, 2008 Share Posted July 9, 2008 verificationimage.php <?php header('Content-type: image/jpeg'); $width = 50; $height = 24; $my_image = imagecreatetruecolor($width, $height); imagefill($my_image, 0, 0, 0xFFFFFF); // add noise for ($c = 0; $c < 40; $c++){ $x = rand(0,$width-1); $y = rand(0,$height-1); imagesetpixel($my_image, $x, $y, 0x000000); } $x = rand(1,10); $y = rand(1,10); $rand_string = rand(1000,9999); imagestring($my_image, 5, $x, $y, $rand_string, 0x000000); setcookie('tntcon',(md5($rand_string).'a4xn')); imagejpeg($my_image); imagedestroy($my_image); ?> Im using this link for show the image.... <img src="verificationimage.php?<?php echo rand(0,9999);?>" width="50" height="24" align="absbottom" /> At the before I didnt see any problem..when I changed my hosting company, this script is not show anything(JPEG files) What can be the reason? Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted July 9, 2008 Share Posted July 9, 2008 is there an error? do you have gd installed? Quote Link to comment 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.