O'Reilly logo

WordPress Plugin Development Cookbook by Yannick Lefebvre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing a captcha on user forms

A common security measure on website forms is to use captcha codes, where distorted letters and numbers are displayed with surrounding visual noise, to check that the person submitting data is not a spam robot. The form that we have been building to accept visitor-submitted book reviews could benefit from this type of technology.

This recipe shows how to download and incorporate a simple captcha library in the submission form created earlier and how to check whether the submitted information matches the content from the captcha image.

Getting ready

You should be running the final version of the Book Reviews plugin created in Chapter 4, The Power of Custom Post Types, and should have already followed the Sending ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required