Should I use the GD library in PHP to draw CAPTCHA images?

Is PHP's GD library suitable for drawing images from scratch? Or would I be better off just importing an image and altering it...

Answers


Not sure it'll be possible to know how many people use one solution, or the other ;-)

But the most reasonnable answer would be, in your case, that choosing one solution over the other depends on your situation :

  • If you have a base-image and just need to add a small portion of information, loading an existing image will probably be the simplest solution
  • If you need to generate an image that's customized a lot, different for each one of your pages, going with a full-generation from scratch might be easier.

No, you defiantly should not write your own captcha. Please use re-capthca it is by far the most secure capthca ever made, and its free. If this doesn't work use one of the many (vulnerable) Capthca libraries that use gdlib.


If you're not limited to GD, you may also want to look at the ImageMagick extension. This has a comparison :)


Need Your Help

Qtip2 / Isotope Conflict in WordPress: "Uncaught TypeError: Cannot call method 'call' of undefined"

javascript php wordpress jquery-isotope qtip2

I'm having what appears to be a hard conflict between Jquery Isotope and Qtip2. When Isotope is loaded, qtip doesn't work, and when it SHOULD be activating, I get the JS error in my Chrome console:

Entity Framework (5) View parameters passed to generated SQL

c# linq entity-framework

How do I view the parameters (Bind Variables) passed to the generated SQL command created by Entity Framework (V5)?