News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Simple Captchas with PHP and GD
March 07, 2014 @ 12:05:38

On the SitePoint PHP blog there's a new post by Mahul Jain looking at a simple way to create CAPTCHA images in PHP using the built-in GD libraries.

By now, we've all encountered captcha images in online forms. Captchas are a necessary evil, and this article will teach you how they're made. Please note that while there are better, automatic third party solutions for captchas out there such as ReCaptcha, this tutorial aims merely to explain and demonstrate how such technology actually works. We won't be explaining what captchas actually are, as it's assumed to be common knowledge and already covered in greater detail elsewhere.

He walks you through the whole process of making the sample CAPTCHA (like this one):

  • Display an empty image on the browser
  • Create a shape
  • Generate random lines
  • Generate random dots
  • Generate random text

There's screenshots all along the way too for reference as to what your result should look like. You can download the full code over on GitHub.

0 comments voice your opinion now!
captcha gd tutorial introduction

Link: http://www.sitepoint.com/simple-captchas-php-gd/

blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Accessing DB2 Data Inside of i5/OS

IBM developerWorks: What's new in PHP V5.2, Part 4: Using the new ZIP extension

Brian Snugg's Blog: Reverse Proxy in PHP5

Francois Zaninotto's Blog: Validating a YAML file against a schema in PHP

MaltBlue.com: Using ZFTool for Basic Project Management


Community Events

Don't see your event here?
Let us know!


development community video introduction opinion interview release podcast library laravel series laravel5 api language extension voicesoftheelephpant unittest psr7 framework conference

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework