PHP Classes

EZ PHP Captcha Script: Validate human users showing an image with a text

Recommend this page to a friend!
  Info   View files Documentation   Demos   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 112 This week: 1All time: 9,599 This week: 560Up
Version License PHP version Categories
class_ezcaptcha 1GNU General Publi...5HTML, PHP 5, Validation
Description 

Author

This class can validate human users showing an image with a text.

It can generate an image with a random text that users need to enter in a form text input to confirm they are real human users.

The random text is stored in a session variable, so the class can verify if the user entered the correct text.

The class can also generate HTML and JavaScript for the form to display the validation image.

Picture of MHCSoft Development
Name: MHCSoft Development <contact>
Classes: 2 packages by
Country: United States United States
Age: ???
All time rank: 4217536 in United States United States
Week rank: 411 Up48 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

Documentation

Copy the class_ezcaptcha.php file on your server and replace "<real path to your ttf fonts>" for the real url pointting to the fonts files changin the name of the fonts aswell if you needed. Include the tag <catpcha></captcha> in the html file at the place yuo want to show the captcha. You most include JQuery into your html file and include the following javascript fragment at the end of the html file inside the <script></script> tags. Remember to replace the "<urlto>" for the real url pointting to the class_ezcaptcha.php file (function(){ $.ajax({url:"<urlto>class_ezcaptcha.php?getHtml=1", success: function(result){ $("captcha").html(result); }}); })(); Include the param captcha and his value on your POST or GET param string when you're sending the form http request. Validate the params at your server side code using someting like this: if($_POST['captcha']!=$_SESSION['captcha_code']){return "ERRORcaptcha|Wrong captcha";} Validate the resoults in your ajax/html file after sendig the http request. Enjoy it...

  Demo ezcaptcha External page  
  Files folder image Files  
File Role Description
Plain text file class_ezcaptcha.php Class php code
Accessible without login Plain text file howto Doc. How to
Accessible without login Image file icon Icon image
Accessible without login Image file image Photo image
Accessible without login Image file screenshot.png Photo image screenshot

 Version Control Unique User Downloads Download Rankings  
 0%
Total:112
This week:1
All time:9,599
This week:560Up