I’m writing a fastcgi app for my website in C.
How do I use GD to generate a CAPTCHA image?
I searched for some stuff on google in vain (still search is going on), but it would be nice if someone could give me the basic idea about the procedure.
For random numbers, I will use nanoseconds as seed (or use that itself).
Thanks in advance.
Look at the
void gdImageStringUp(gdImagePtr im, gdFontPtr font, int x, int y, unsigned char *s, int color) (FUNCTION)code example (you can pretty much copy-paste it)..http://www.libgd.org/Font
The noise is done with random pixels/lines/etc, which is trivial:
http://www.libgd.org/Drawing
LibGD has like a zillion examples on their website.