You are not logged in.
- Topics: Active | Unanswered
Pages: 1
#1 Apr 18, 2014 8:53 PM
- Swaffy
- Member

- Registered: Aug 24, 2008
- Posts: 6,587
- Gems: 218
Nerdy Web Talk
To begin, I'd like to talk about e-mail form security. To make sure a dorky bot isn't going to send spam e-mails.
I found this forum thread showing some super short & simple code to make sure bots (or at least dumb bots) aren't going to send spam e-mails. What do you think?
http://www.webmasterworld.com/webmaster/3218242.htm
I'm thinking about implementing it into my website's e-mail form, I just don't trust any of those third-party Captcha-like additions.






Offline
#2 Apr 18, 2014 9:23 PM
- Stormy
- Administrator


- From: Illinois
- Registered: Jun 01, 2006
- Posts: 10,385
- Gems: 542
- Birthday: 3 April
- Gender: Female
- Website
Re: Nerdy Web Talk
It's a good method to use. Spyroforum blocks hundreds of spam registration attempts a day with a bit of code like that.
I would put the "visibility:hidden" part in an external CSS file just to be safe, though. If the bot creator catches on to that trick, they could just make it look for the word "hidden" in a tag and ignore everything inside it.
Offline
#3 Apr 18, 2014 9:36 PM
- Swaffy
- Member

- Registered: Aug 24, 2008
- Posts: 6,587
- Gems: 218
Re: Nerdy Web Talk
I would put the "visibility:hidden" part in an external CSS file just to be safe, though. If the bot creator catches on to that trick, they could just make it look for the word "hidden" in a tag and ignore everything inside it.
That's actually a good idea. At first this is what I was trying out, just for experimentation purposes:
(rest of form)
<label for="email">E-mail Address (required)</label>
<span style="visibility:hidden;"><input style="width:0px;height:0px;border:none;margin:0px;padding:0px;" id="email2" name="email2" type="text" maxlength="120" size="30" /></span><br />
<input id="email" name="email" class="text" type="text" maxlength="80" size="30" placeholder="[email protected]" required="required" />
</li>
(rest of form)... but I began to think about the exact thing you said. What if the style attributes get read? So I am trying to think of some clever ways to rename my form to work well, such as naming the actual user-used email box "fake_email" and setting a clever class name. This would at least reduce the amount of spam.
Last edited by Swaffy (Apr 18, 2014 9:43 PM)






Offline
#4 Apr 18, 2014 10:17 PM
- Swaffy
- Member

- Registered: Aug 24, 2008
- Posts: 6,587
- Gems: 218
Re: Nerdy Web Talk
Okay I got it working. I couldn't use
required="required"for the e-mail so I made up some internal code to do the checking manually. It looks good so far and the testing came out just right.






Offline
Pages: 1