Create Anti-Spam Email Address in WordPress
I recently found a gem in the WordPress documentation. If you are looking for a way to display an email address but you do not want to use the actual email address because you are worried about spam, worry no more. Check out the “antispambot()” function that we have in WordPress. This function will take the email address that you want to use and obfuscates it. When you view the page you see the actual email address. When you view the source you do not see you see an encoded email address.
In the example below – I will am using the WordPress function “antispambot” to create a mailto link for the post author (this would go in the loop).
<a href="mailto:<?php echo antispambot(get_the_author_meta('user_email')); ?>">Email the Author</a>
SDAC Recommends: WP Plugin: http:BL
Using Akismet for spam control has worked out really well over the last few years but I started seeing more and more spam get through (daily) so I decided I needed to look into something that would compliment Akismet. Once I installed the http:BL plugin – I have not had one spam comment get through. About the plugin:
http:BL WordPress Plugin allows you to verify IP addresses of clients connecting to your blog against the Project Honey Pot database. Thanks to http:BL API you can quickly check whether your visitor is an email harvester, a comment spammer or any other malicious creature.
If you are having any problems with spam getting through, check out: http:BL.