FW: [PHP] webform spam prevention

[email protected] ("Jen Rasmussen")
Newsgroups php.general
Organization Cetacea Sound Corp
Message-ID <003e01ce306c$feca38f0$fc5eaad0$@com>
I love this idea, thanks! 

Jen


-----Original Message-----
From: viper [mailto:[email protected]] 
Sent: Wednesday, April 03, 2013 3:56 AM
To: [email protected]
Cc: [email protected]
Subject: Re: [PHP] webform spam prevention

On Tue, Apr 2, 2013 at 9:13 PM, Jen Rasmussen <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.