Fri Feb 29, 2008 12:01 pm - How To Stop Spam Robots From Submitting Forms Preventing Spamming PHP
#1846
How To Stop Spam Robots From Submitting Forms Preventing Spamming PHP
I have a customer who has a contact us form. Everyday he gets like 10 contact us submissions from abviously spam robots because the information he gets is a bunch of html links with the <a href tag.
He asked for my help on how to stop this.
One way to stop it by puttin a captcha in your forms.
What is captcha? CAPTCHA stands for:
completely automated public Turing test to tell computers and humans apart,
CAPTCHAs are used to prevent bots from using various types of computing services or collecting certain types of sensitive information. Applications include preventing bots from taking part in online polls, registering for free email accounts (which may then be used to send spam) and collecting email addresses. CAPTCHAs can prevent bot-generated spam by requiring that the (unrecognized) sender pass a CAPTCHA test before the email message is delivered, but the technology can also be exploited by spammers by impeding OCR detection of spam in images attached to email messages. CAPTCHAs have also been used to prevent people from using bots to assist with massive downloading of content from multimedia websites. They are used in online message boards and blog comments to prevent bots from posting spam links as a comment or message.
basically you can us CAPTCHA by putting a confirmation on the form, kinda like a picture or an image with numbers and letters and the user has to eneter the number of letter on the image, then validate the information, if it matches with what's in the image, the the form is approved, otherwise, it fails back to the user. and in most cases, it will fail back to the spambot.
my suggestiong to our customer was to use the ege() function in their PHP form. In his case, if any information in the form had the character "<", the form would fail
Code:
after we implemted the ereg() function, he stopped getting those fake contact us.
He asked for my help on how to stop this.
One way to stop it by puttin a captcha in your forms.
What is captcha? CAPTCHA stands for:
completely automated public Turing test to tell computers and humans apart,
CAPTCHAs are used to prevent bots from using various types of computing services or collecting certain types of sensitive information. Applications include preventing bots from taking part in online polls, registering for free email accounts (which may then be used to send spam) and collecting email addresses. CAPTCHAs can prevent bot-generated spam by requiring that the (unrecognized) sender pass a CAPTCHA test before the email message is delivered, but the technology can also be exploited by spammers by impeding OCR detection of spam in images attached to email messages. CAPTCHAs have also been used to prevent people from using bots to assist with massive downloading of content from multimedia websites. They are used in online message boards and blog comments to prevent bots from posting spam links as a comment or message.
basically you can us CAPTCHA by putting a confirmation on the form, kinda like a picture or an image with numbers and letters and the user has to eneter the number of letter on the image, then validate the information, if it matches with what's in the image, the the form is approved, otherwise, it fails back to the user. and in most cases, it will fail back to the spambot.
my suggestiong to our customer was to use the ege() function in their PHP form. In his case, if any information in the form had the character "<", the form would fail
Code:
ereg('<', $form_info )
after we implemted the ereg() function, he stopped getting those fake contact us.
author: wallpaperlinks