justsimpleshh
justsimpleshh

Reputation: 97

Antibot PHP using substring

Just Curiosity,

On a form, for example 'name', 'email', 'password'. You added another field 'First 3 characters of email' and then on the connect.php you did an if statement basically

<?php
...
$subemail=substr($email,0,3);

if ($subemail === $firstthree){....
...?>

How good of an antibot would that be (security wise)? EDIT OR what percent of bots do you think it would stop?

Upvotes: 0

Views: 1375

Answers (3)

R&#225;pli Andr&#225;s
R&#225;pli Andr&#225;s

Reputation: 3923

I would use reCAPTCHA (Google's anti-spam filter), check out its URL: recaptcha

Upvotes: 0

user3011538
user3011538

Reputation: 9

I'm not sure how this would fit into your idea, however I saw an interesting(for me at least) anti-bot type of question on a site.

It was a predefined question like: What's the tallest mountain on Earth?

Answer is simple enough. Answer it correctly, and you can proceed to whatever page follows.

Obviously the questions were random.

Upvotes: 0

qwertynl
qwertynl

Reputation: 3933

I do not see how that is random at all.

Usually "antibot" filters, like CAPTCHA, utilize images that bots cannot easily read, and therefore would get wrong.

Using the 1st three letters of an email address could be very easy to hack.

Upvotes: 1

Related Questions