- Forums
- Scripts
- 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 [1311], Last Updated: Sat May 18, 2024
wallpaperlinks
Wed Jan 03, 2007
5 Comments
5788 Visits
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.
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.
https://www.wallpaperama.com/forums/how-to-stop-spam-robots-from-submitting-forms-preventing-spamming-php-t679.html