Programista PHP MySQL
about programming in PHP a few words

The fight with robots

Published Thursday, 23 March 2006 by Luke Jarzembowski

Spam knows no bounds. Works, which once went through the pages in search of e-mail, now is already better "armed" - automatically fill all web forms ...

Such works are filed, "thinking" that they are contact forms, and data collected from them are immediately sent to the owner of the service function of the mail .

Often hit the jackpot and the site owner receives SPAM'az own site. Sometimes it goes even better - SPAM'a orzymują all included on the mailing list, which directs the form. Often filled registration forms, assuming unwanted account.

How to fight them?

First, always check the correctness of data received by the script. For example, registration forms always checks the entered email address and a row of user login names that meet specific criteria (eg the same lower case letters and digits, no spaces or special characters).

Second, if the form is used to send emails to more people, enter the function of moderation. It consists in the fact that data from the form is saved in the database, and to the moderator (ie you) will be sent email telling what data has been entered and a link is clicked is the same as sending all mail.

Thirdly, you can create a form of "false action". Here's an example:

<form method="post" action="nieistniejaca_strona.php" onsubmit="this.action=' odbierz_dane.php'">

Note that the form action parameter points to a non-existing page, or page, the task is not processing the form. Only when you send the form (onsubmit event) swapped the page on which we send the correct data.

Here I used JavaScript. Many robots can not handle it, so the forms constructed in such a way that is safe for now. Of course, if you know JavaScript, you can modify this script to life even more difficult for robots :-)

If you like this entry, please him
or recommend other social networking sites: Bookmark and Share
Categories: Programming
Tags: , , ,
Luke Jarzembowski Luke Jarzembowski, author of the blog - since 2006 under the illusion that it will be rich ... ;-) But still working hard on this. Programs , blogging , and positions , creating and promoting their e-businesses . kontakt

Entries similar to "Fight the robots'

    No related posts

Comment