pureMango.co.uk

there's nothing about mangos or purity. It's just a name..



hide email addresses from spammers with this free email2image PHP script  Email PNG
Want to display your email, but scared it'll get picked up by spambots?

Then you need the imaginatively titled Email PNG!

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 fo 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.

source - (for demo, see the homepage)




 User Comments:

Who: u24
When: November 29th, 2004
Says: use the hash calculator in the online tools section to create your base64_encoded string, or use PHPs base64_encode function.

and yes, it's not going to stop a spambot if it's been customised to recognise and decode base64'ed strings, but I really don't think spammers are that clever.

Who: igor
When: January 14th, 2005
Says: u can crypt email in address - surely only u must know pass :)

Who: u24
When: January 16th, 2005
Says: no, there's no password, base64 is a bit like rot13 - just a method for encoding (rather than encrypting, which would require a password)

Who: email address imagified
When: January 17th, 2006
Says: Nice script! , one thing that i added to it was a bit of "protection" with the following code :

$use_only_in = "www.puremango.co.uk";

if (!strstr( $_SERVER['HTTP_REFERER'] , $use_only_in )) {
exit;
}

at the start of the script, this prevents people from other sites from using the script unless the referer is your own site.


The downside to this is that you wont be able to call email.php directly,without using , but that would be such a big deal.
---
from u24:
nice one. thanks.
might want to make it stristr
just in case..

Who: email address imagified
When: May 27th, 2007
Says: Ok, another dumb question,... but, where do you add that html part?

Kat
---
from u24:
just put the img tag whereever you want an email address to be displayed on your website.

 Add your comments:
Who / E-Mail:*
Your Comments:*
(php/html will be removed)

Because spammers have targetted me due to my antispam efforts, I'm going to have to ask you to complete this CAPTCHA test before posting.
Learn more about fighting spammers.
 enter text
word above:
If you can't read the word, click here
 
* denotes a required field.
Your email address will be converted to an image to prevent spambots picking it up.
yup, it's a mango.

Scheme:  R G B T