It’s not often that spam gets past my defenses. However, when it does, it’s really annoying. So today I set out to stop comment form spammers from submitting forms with one or more links.
PHP’s STRISTR searches a string for anything that matches your search. So, searching for “http://” will return true if it is found in the string. This will only work on form fields that you do not want to allow a link to be added. So, it may help to give visitors a heads up before they post a comment with a hyperlink included. Continue reading Use PHP STRISTR To Stop Comment Form Spammers