Create CAPTCHA Protection with PHP and AJAX

0

CAPTCHA is a simple test to determine if a user is a computer or a human. It is used to prevent spam abuse on the websites. So if you use CAPTCHA on your web site forms, this can help in stopping some bots and making life harder for other bots in accessing or using your forms.In brief the CAPTCHA protection works by generating a random string, writing it to an image, then storing the string inside of a session or by some other method. This is then checked when the form is submitted.
We need 4 files, name:
ajax_captcha.js // This file process ajax post for form.
captcha.php // This will check if captcha submited is valid or not
create_image.php // This file will creat an image from session string
index.php // This is demo file, will show a captcha image and form to test

Demo: PHP AJAX CAPTCHA

So, here we go:
1, ajax_captcha.js

2, captcha.php

3, create_image.php

4, index.php

Download: http://yyen.info/rRjMrLlFZB

Create CAPTCHA Protection with PHP and AJAX
5 - 1191 votes

Other Posts you may be interested in:

  1. Các loại vacxin cần thiết phải tiêm phòng cho trẻ
  2. Cấu hình máy tính để bàn cho văn phòng như thế nào là phù hợp?
  3. Đêm Buồn Tỉnh Lẻ – HD Karaoke
  4. PHP convert accented characters to ascii
  5. Lk Đôi ngả chia ly – Cho vừa lòng em
  6. Tổng hợp khuyến mại Black Friday & Cyber Monday 2016
  7. Lịch thi đấu ngoại hạng Anh mùa giải 2018 – 2019
Cập nhật lúc: 15:30:50 PM, 9th September 2014

Comments

Leave A Reply