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? Link to comment https://forums.phpfreaks.com/topic/113837-verificationimage-is-not-working/ 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? Link to comment https://forums.phpfreaks.com/topic/113837-verificationimage-is-not-working/#findComment-585030 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.