-1

I've a form with a text input for email. I don't want to use the captcha to avoid robots. But I used to use a method.

I give my email text input a name="courrier" or another name and I create another hidden text input with name="email".

In the php code, I've put a condition:

if (empty($_POST['email'])) {
  // add infos in the database
} else {
  //this is not allowed to use robots
}

Is this method useful to avoid some captcha that can be annoying in the website?

user229044
  • 232,980
  • 40
  • 330
  • 338
SmootQ
  • 2,096
  • 7
  • 33
  • 58
  • 1
    This is called a honeypot. http://en.wikipedia.org/wiki/Honeypot_%28computing%29 – Gazler Nov 25 '10 at 18:55
  • @Gazler I don't think a single hidden HTML input element can be considered a honeypot... – user229044 Nov 25 '10 at 19:03
  • 2
    @meager You are setting a trap for bots. I'd say that is a honeypot. Altough I'd hide the field with css and make it a normal input. http://haacked.com/archive/2007/09/11/honeypot-captcha.aspx is an article on the technique. – Gazler Nov 25 '10 at 19:08
  • @meager the trap usually works.. except when the bots are some kind of intelligent. – SmootQ Nov 25 '10 at 19:37
  • 1
    Well, now that makes sense - selecting a solution which of which you know it does **NOT** solve the problem and then ask wether it is useful... Live with a captcha or live with spam. Your call. – Markus W Mahlberg Nov 10 '15 at 08:31
  • @MarkusWMahlberg Thank you ... back in 2010, it was my first year as a web developer, I didn't know much back then... :) – SmootQ Nov 14 '15 at 12:39
  • @MarkusWMahlberg , Actually, when I see this question now .. it sounds very naive. – SmootQ Nov 14 '15 at 12:41
  • @SmootQ Jeez, how did I stumble on this one? And how did I not realize that this was grave digging... – Markus W Mahlberg Nov 14 '15 at 15:13
  • @MarkusWMahlberg, it happens, you search and you find. Thank you :) – SmootQ Nov 16 '15 at 11:58

1 Answers1

1

is this method useful to avoid some captcha that can be ennoying in the website???

To a certain extent, yes. It's not foolproof, but it'll certainly block some attempts.

ceejayoz
  • 176,543
  • 40
  • 303
  • 368
  • thank you... but I really want to know even if someone won't develop an intelligent robot in the future – SmootQ Nov 25 '10 at 19:31