FW: [PHP] webform spam prevention
| From: | Jen Rasmussen | Date: | Wed, 03 Apr 2013 13:13:12 +0000 |
| Subject: | FW: [PHP] webform spam prevention | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-320756@lists.php.net to get a copy of this message | ||
I love this idea, thanks!
Jen
-----Original Message-----
From: viper [mailto:recursivepointer@gmail.com]
Sent: Wednesday, April 03, 2013 3:56 AM
To: jen@cetaceasound.com
Cc: php-general@lists.php.net
Subject: Re: [PHP] webform spam prevention
On Tue, Apr 2, 2013 at 9:13 PM, Jen Rasmussen <jen@cetaceasound.com> wrote:
> Has anyone used this method or have any other better suggestions?
i just use dynamic and not standard names for my input tags like this:
<div style="display: none;">
<form method="POST">
user:<input type="text" name="user"><br> pass:<input
type="password"
name="pass"> </form> </div> <form method="POST">
user:<input type="text"
name="c1b0e463e00dba2949e5e75975e23697"><br>
pass:<input type="password"
name="ad67645ba39ea47c32af449f294f01c4"><br>
<input type="submit">
</form>
the first form, in the display-none-div, is something like an honeypot.
in the second form, tag names are generated in php by md5(microtime()) and
stored in $_SESSION array for the submit handler..
you could also write the login form from javascript (document.write) using
unescape function:
document.write(unescape('%3c%66%6f%72%6d%20%6d%65%74%68%6f%64%3d%70%6f%73%74
%3e%3c'));
bye
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments