need some help with php code thingy stuff :)

Sneeky

Honorary Master
Joined
May 5, 2004
Messages
12,176
Reaction score
2,733
Location
Durban
Hi
Clueless at this stuff and need some help with some basics please.

what is a safe way to add email link in to prtect from spam harvesting bots.

currently I have a line in the code as follows

<h2><a href="mailto:emailaddy.com"><b>Contact Email</b>:</a></h2>

Is there a better way to do it to make sure it is secure or is that good enough.
Shot
 
Thats the very worst you could do :)

Check www.resurrection.co.za/info.php if you want the code to generate that email address image. Its dynamic.

Of course the drawback is that people have to manually type the address into a new email, but hey, spam is far worse.
 
Another option

You could also encode the actual link in ASCII; all browsers can read and interpret it, but most spambots are simply too lazy to bother.

An example:
[email protected] becomes [email protected]

So your link becomes:
<a href="mailto:[email protected]">[email protected]</a>

You can of course go one step further:
<a href="mailto:[email protected]">[email protected]</a>
so that a bot sniffing for the"@" sign won't find it.

And then you can go even firther and include the "mailto:" portion as well:

<a href="MAILTO:[email protected]">[email protected]</a>

Do a Google for "convert text to ascii"

Hope this helps.

I actually entered the ASCII characters in the above, but the browser is displaying it as normal text. To clarify:the text in capitals must be the ASCII equivalent. Anyways, you get the message; I rest my case.
 
Last edited:
You could also encode the actual link in ASCII; all browsers can read and interpret it, but most spambots are simply too lazy to bother.

An example:
[email protected] becomes [email protected]

So your link becomes:
<a href="mailto:[email protected]">[email protected]</a>

You can of course go one step further:
<a href="mailto:[email protected]">[email protected]</a>
so that a bot sniffing for the"@" sign won't find it.

And then you can go even firther and include the "mailto:" portion as well:

<a href="MAILTO:[email protected]">[email protected]</a>

Do a Google for "convert text to ascii"

Hope this helps.

I actually entered the ASCII characters in the above, but the browser is displaying it as normal text. To clarify:the text in capitals must be the ASCII equivalent. Anyways, you get the message; I rest my case.
What he said. I use the same trick on my web sites.
 
Hi there,

Your template looks great, except the navigation tab is off by a few pixels (on latest FF). It should shift up a bit...

Otherwise, really neat work!

M.
 
Top
Sign up to the MyBroadband newsletter
X