[JQuery tutorial] Learn jQuery in 15 days (6

Source: Internet
Author: User
Tags contact form

 

15 Days of jQuery (Day 6) --- safer Contact Forms without CAPTCHA

 

The content of this tutorial is close to the technical direction I am good at: Safe contact forms.

As I mentioned in the previous tutorial, A common contact form helps a visitor communicate with you without exposing your email address to the hateful spam makers.

But if spammer is already targeting you, nothing is worse than an insecure contact foms. Imagine that your network space provider sent you an email with a strong wording saying: They found that your website sent a large number of sex drug ads and other spam. In addition, your website will be offline until you stop it.-Thank you!

So, today, I want to tell you in this tutorial a simple way to add an extra security layer to any contact forms-even if you do not use the super security and super flexibility I provide ultimate Form Mail.

Current Status

You realize that spammer has discovered the weakness of your contact forms through remote detection technology, and you want them to go away.

Difficulties

You don't want to use CAPTCHA (Completely automatic Public Turing Test to Tell Computers and Humans Apart) Because you understand, so that your visitor can read the seven-to-eight letter numbers before sending messages can only suppress their desire to interact, rather than promote it. (Digital verification defects)

 

Key point: you want the bad guys to get stuck in the dark, and you want the good boys to get in Rome.

Solution

You will learn to use jQuery to add some hidden tag information to your contact forms during page loading. When the form information is submitted to the server, you can use some simple php code to perform the following steps:

The hidden tag is identified. The hidden tag information is consistent with a flag in the cookie downloaded to the browser by your website visitor. The validity period of the hidden tag has not expired. In other words, visitors can enter the form and send it only within a limited period of time. If a spammer tries to submit the form information to your server through a remote call, they will find that they have played a thick and hard iron plate, and will not pay for it.

I will tell you that this method was modified from the blueprint provided by a very smart colleague Chris Shiflett. He is a professional security expert who knows the security problems that php programmers often encounter (how do I feel that he can't help mentioning his Ultimate Form Mail again ~~ Khan ).

Tutorial

I decided to create a similar "hand-held graphic tutorial" based on the response of the last article "easily creating a zebra Chart ". Although it takes some time, it is worth doing so.

Hands-on tutorial

DEMO

Source code

Silver bullet?1)

Silver bullet is a term in the software field, meaning a solution to all problems. This is a legend from Europe that only silver bullets can destroy the werewolf.

"So now my form is 100% secure. Can I assume any free cntact forms Program, and then rest assured ?"

Er... None.

This security mode is based on a key assumption:Spammer will always take soft persimmons and waste time solving a sly opponent. It is a waste of money for them.

Now, let's listen, my friends:

Although robust, this technology is still not a panacea for solving the currently fragile form processing program problems.

The purpose of my security suggestions is to make spammer difficult. Thieves will always step on the page before they initiate a burglary. They are only interested in rooms that can obtain the maximum benefit at the minimum cost.
1. Paging title # e # <2. Paging title # e # <3. Paging title # e # <4. Paging title # e # <5. Paging title # e # <6. Paging title # e # <

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.