Breaking News
You are here : Home / Web development / PHP / Google Like Captcha in PHP
PHP captcha ,google like captcha

Google Like Captcha in PHP

Google Like Captcha in PHP

Hello Guys ! Captcha is very important to stop and prevent bots accessing our web forms.as php is widly use i decided to make a class which will generate google like capthca’s in your web pages or web forms.This class is quite interesting as it comes with many customization options.you just need to use this class and some of its resource files.it is quite easy to implement.

Google like PHP captcha comes with lots of advanced customization’s.you can control size,color,background even control the format of the image through class member function we’ll see in the advanced section of this article at the bottom .SO lets move on and see Google Like Capthca working and Full tutorial.

Google Like Captcha in PHP -Live Demo And Download

Lets see the live demo and then download Google like captcha in PHP.

Live Demo Download

Google Like Captcha in PHP : – Tutorial

lets move to the tutorial of  Google like capthca in PHP which comes with many customization options.First we look at what is required to implement Google like captcha in our web Forms

Google Like Captcha in PHP : -required files

  • capthca.php                               <-The captcha class
  • image.php               <-our image renders in this file
  • Resources folder <- contains reuired fonts and libraries.

The Above are the three things required.First thing you should do is to download all these files from link above or at the end of the page and place in your PHP project as such without changing their hierarchy . [separator /]

Creating web form with Google like Captcha –

Now we Gonna Create a web form in our page say(index.php) .Lets see how do we render google like capthca in our web form.See the code below. Index.php

this will render the captcha in your webpage(index.php) but not validate it.Lets move on and see validation in our index.php file.validation code will be at the top of index.php [separator /]

Validating the webform captcha

now we gonna write code to validate the rendered google like captcha.validation code reside at the top of the index.php . index.php(at the top)-

The code above will validate your captcha.this is how it all works.now lets move to advaced section and see the customization options in this php capthca

Google like Capthca -Advanced Customization : –

Now for the advanced customization we ‘ll open our image .php file.firstly lets see how image.php looks.

Image.php

Here we can clearly is Image.php and cutomization done via configCaptcha function of the class PHP captcha.the configCaptcha function is optional for advaced customizations.you can use it to change background color,colors of captcha,format of the image,quality,width,height and length of the captcha string generated in the image.

[separator /]

Google Like Captcha in PHP -Live Demo And Download

Lets see the live demo and then download Google like captcha in PHP.

Live Demo Download
Tags : , , ,

Leave a Reply

Want to join the discussion ? Feel Free to contribute !