|
Posted by shimmyshack on 03/30/07 09:15
On 30 Mar, 09:59, "Sean" <sean.anderson@[nospam]oakleafgroup.biz>
wrote:
> > $myEmail1 = "myem...";
> > $myEmail2 = "@";
> > $myEmail3 = "blah.com";
>
> As someone suggested, the fact that this is constructed on the server,
> offers us nothing.
>
> Would not make more sense to carry this style in the HTML, as Javascript?
>
> Something like:
>
> <script>
> function em(who, domain, ext)
> {
> location.href = "mailto:" + who + "@" + domain + "." + ext;
> }
> </script>
>
> <a href="" onClick="em('dave','msn', 'com')">Email Dave</a>
> <a href="" onClick="em('sarah','hotmail', 'co.uk')">Email Dave</a>
>
> By far, I am not suggesting this as the be all and end all solution, but
> like someone else suggested ... ensuring that the resulting HTML does not
> display the full e...@domain.com style address on the page, or in the HTML
> code certainly does help limit the spam.
>
> Okay, so any programmer with 20 seconds to spare would write something to
> unravel this, but with the "billions" of email addresses readily available
> on so many websites, is it worth their effort?
>
> Anyway, that's my thoughts, for what they're worth.
yeah in fact any programmer who really wants email addresses just
needs to leverage a javascript engine, something from firefox perhaps
to get passed all the obfuscation, and other tricks. But as you say
its low hanging fruit.
I find this works though it is accessible (and strip_tags would beat
it)
<a id="contactaddr" href="#"><span>con<!-- no spam -->tact</span><!--
no spam -->@<span>myser<!-- no spam -->ver.</span>org</a>
then I use a piece of javascript in the head to create a real mailto
link in the DOM, or an onclick to a function, you could swop out the @
for @ I guess again reducing the exposed surface area.
This way it remains readable and accessible and copy and pasteable
when js is off, but becomes
clickable when js is on.
[Back to original message]
|