Anti-Spam Email PNG


This is a simple way to display your email without fear of it getting picked up by spammers; it creates an image of the email address you send it. To be honest, I don’t think in this day and age spammers spend huge amounts of time trawling through gigs of websites looking for email addresses so all this “howard DOT yeend AT gmail DOT com” stuff I think is largely futile – have you experienced a drop in spam since obfuscating your address like that? Thought not. But hey, if you want to see how to write strings in PHP, check out the code :)

Here’s how it works, in your html source, use this simple code:
<img src=”email.php?text=(base64_encoded email address”>

email.php will generate a png of the right size, with an invisible background.

You can even customise the colour, something like this:

<img src=”email.php?r=100&g=5&b=100&text=(base64_encoded email address)”>

where ‘r’, ‘g’ and ‘b’ are the amounts (0 to 255) of red, green and blue to use.

Download PHP Source

DEMO:

Here’s my obfuscated email address:

Bookmark and Share

, ,

  1. No comments yet.
(will not be published)
  1. No trackbacks yet.