tommylennie Posted April 9, 2008 Share Posted April 9, 2008 Hi All, I have created a guestbook application that works fine except that it gets at least one spam entry a day on average. I tried a few things but it doesn't seem to work. Here is the code Im currently using to try and stop these spams. Its set to return an error if any entries contain a link.... if(!strpos ($comment, "http")) { $sql="INSERT INTO $tbl_name(name, comment, date)VALUES('$name', '$comment', '$date')"; $result=mysql_query($sql); Any help is greatly appreciated. Thanks Tommy Link to comment https://forums.phpfreaks.com/topic/100329-guestbook-spam/ Share on other sites More sharing options...
fri3ndly Posted April 9, 2008 Share Posted April 9, 2008 You could use a captcha form to verify its not a bot? Other than that theres nothing you can do to stop a human spamming your guestbook Link to comment https://forums.phpfreaks.com/topic/100329-guestbook-spam/#findComment-513023 Share on other sites More sharing options...
darkfreaks Posted April 9, 2008 Share Posted April 9, 2008 captcha is not 100 percent foul proof but it helps almos make sure you clean up use trim and mysql_real_escape_string and htmlentities and htmlspecialchar and strip_tags Link to comment https://forums.phpfreaks.com/topic/100329-guestbook-spam/#findComment-513026 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.