Why are you creating your own captcha? I used the first one I found on google and it worked fine for me. -- itoctopus - http://www.itoctopus.com "Dave M G" <martin@xxxxxxxxxxxxx> wrote in message news:464C4C73.7060003@xxxxxxxxxxxxxxxx > PHP list, > > I've looked at the manual entries for imagepng() and > imagecreatetruecolor() functions for helping me to create a temporary > image for a CAPTCHA system. > > However, I'm clearly messing up, as what I'm outputting is a bunch of > ASCII gibberish to the screen. > > What I think I need to do in principle is first create the image with > imagecreatetruecolor(), then define it as a PNG (?), then display it. > > So I've got something like this: > > $image = ImageCreate($width, $height); > ImageFill($image, 0, 0, $black); > echo '<img " src="' . Imagepng($image) . '" height="' . $height . '" > width="' . $width .'" alt="captcha" />' . "\n"; > ImageDestroy($image); > > As mentioned, this isn't working, so there's a fundamental concept about > how PHP creates and displays images that I'm not getting. > > I'm trying to output an image that, ideally, won't be stored as a file. > Or, if it has to be a temporary file, to delete it immediately after > displaying it. > > What part am I not understanding? > > Thank you for any advice or information. > > -- > Dave M G > Ubuntu Feisty 7.04 > Kernel 2.6.20-15-386 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php