Thread: Captcha
View Single Post
Old 07-06-2009, 10:00 PM   #14 (permalink)
cecilia
The Contributor
 
cecilia's Avatar
 
Join Date: May 2009
Location: LA, CA
Posts: 87
Thanks: 0
cecilia is on a distinguished road
Default

Ok I already lost the one that I wrote. This is from php.net and its almost jsut like it:

PHP Code:
header("Content-type: image/png");
$im = @imagecreate(11020)
    or die(
"Cannot Initialize new GD image stream");
$background_color imagecolorallocate($im000);
$text_color imagecolorallocate($im2331491);
imagestring($im155,  "A Simple Text String"$text_color);
imagepng($im);
imagedestroy($im); 
What I did was just let it run in the open. And it gives me:

‰PNG IHDRnV,šPLTEé[an÷fIDAT•c` `fxÄÀÃ`Ç ÀçÀä²41ƒ‚€˜Ë–Ý’Àq²@੤;{á0— œi


When I placed this on a separate php file picmaker.php, and used an image tag with the file for its src value it works.

HTML Code:
<img src='picmaker.php' alt='Image created by a PHP script'>
Went through the tutorial again... Sorry, I missed that part, it was there.
cecilia is offline  
Reply With Quote