safe mailto

I've just been looking at the safe_mailto function which outputs the address through javascript to hide it from spam bots.

If the user does not have javascript enabled no email address is displayed. So I've put the plain text version of the email after in a noscript tag like so

Email: &lt;?php echo safe_mailto('[email protected]', '[email protected]'); ?&gt;<noscript>'[email protected]'</noscript>

My question is, by doing this do will spam bots stil pick up on the email address or do they tend to just look for a <a href="mailto"> link?

I know you can never completley protect against spam, just wondering if it worth me bothering with this technique.


I'm certainly no expert but having the email address in the <noscript> tags is just as bad. Spam bots will likely run a regex on the code to extract all email addresses, not just those in an anchor tag.

There are some methods such as obsfucation which will make the spam bots work harder.

Thanks for the reply. I did think it wasn't going to help.

I think it might be best to just stick to the regular mailto and then have our spam filters sort out the incoming emails.


[eluser]Rob Gordijn[/eluser]
why not checking if the visitor has javascript enabled?
If not, ask the visitor to enable it, problem solved :-)


A nice idea but I work for an academic institue so we can't really add restrictions like that.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.