CodeIgniter Forums
safe mailto - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: safe mailto (/thread-31184.html)



safe mailto - El Forum - 06-09-2010

[eluser]vertmonkee[/eluser]
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

Code:
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.

Thanks


safe mailto - El Forum - 06-09-2010

[eluser]AJR[/eluser]
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. http://www.zapyon.de/spam-me-not/index.html


safe mailto - El Forum - 06-10-2010

[eluser]vertmonkee[/eluser]
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.

Cheers


safe mailto - El Forum - 06-10-2010

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

.o/


safe mailto - El Forum - 06-10-2010

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