Jump to content

Anti Spam Measure?


RaythMistwalker

Recommended Posts

I've had an Idea for an anti-spam measure to stop spam accounts from registering if they are bots,

Would it be possibly (and if so how would i do this) to make a hidden field that users cannot see but obviously bots will. Hence since bots fill in every field if this field has info in it then the account will not be created and it will alert admin of ip address etc. So how would i make a hidden text field?

Link to comment
https://forums.phpfreaks.com/topic/196045-anti-spam-measure/
Share on other sites

Meh, something simple like this should suffice:

<form action=...>
..
..
<input type="text" name="name_" value="Name" style="display: none;"/>
..
</form>

<?php 
   if(isset($_POST['name_'])) {
       $ip = $_SERVER['REMOTE_ADDR'];
       $sql=mysql_query('...$ip..');
   }
?>

 

You can do what you want with it there, It'll be invisible to the user but appear to the bot, especially since it has 'name' in it.

 

Link to comment
https://forums.phpfreaks.com/topic/196045-anti-spam-measure/#findComment-1029741
Share on other sites

That is an alright idea, however I can see some bots still slipping by. Why not just us a captcha, I like recaptcha, it is easy to integrate and I haven't had a bot get past it yet.

 

Sometimes that is not the case, but upon reviewing his question, maybe he isn't implementing any basic security such as a TURING test. That combined with my aforementioned code should be nicely enough to catch automated bots.

 

some bots change IP each page hit so you can also store their IP into a session variable on the form page and then compare it to their current IP on the submit page.  only take like 1 line of code and can stop alot of bots.  every little thing helps :D

 

What is the point of this?

Link to comment
https://forums.phpfreaks.com/topic/196045-anti-spam-measure/#findComment-1029794
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.