#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2010
    Posts
    5
    Rep Power
    0

    Protect email address from spammers


    Hi. Suppose I have an email.

    I encode the email to hex coding by php,

    In coding it looks like this.

    <a href="mailto:hex coding">test[at]test.com</a>

    I need to know is this correct to protect my emails from spammers.
    Or I need to encode "test[at]test.com" too?
  2. #2
  3. Lord of the Dance
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2003
    Posts
    3,733
    Rep Power
    1959
    If you have a clear text e-mail address in you code, it is not protected.

    You could use another text which the user click on, for example "Send e-mail".
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2010
    Posts
    5
    Rep Power
    0
    Originally Posted by MrFujin
    If you have a clear text e-mail address in you code, it is not protected.

    You could use another text which the user click on, for example "Send e-mail".
    You mean if I write
    <a href="mailto:hex coding">Send e-mail</a> it will be ok?

    What if write <a href="mailto:hex coding">hex coding 2</a>
    where "hex coding 2" is test[at]test.com or even my clear e-mail.

    Thanks.
  6. #4
  7. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,136
    Rep Power
    1990
    If you mean hex coding as in the AASCI letter values, then yes, you will be able to mask your email address from human visitors, until they click on the link.

    Unfortuantely, this will have almost no effect whatsoever on SPAM bots harvesting your email address. Anything that's not a primative back-yard hack job has got all sorts of algorythms built in to look for things just like you've suggested. I've seen some pretty sophisticated JavaScript obfuscation methods get harvested before, so it comes down to... If it can be decoded by the web browser somehow, then it can be decoded by SPAM'ers.

    The only way to stop your email addres from being harvested like that is to not include it at all. So, you'd build a 'contact us' form, and have your server do all the processing and never have your email address visible anywhere on the page.

    Then there's the other issue that SPAM'ers don't just go harvesting, although it does make it easier for them. Most of the addresses that they get are found from adding everything from a huge list of common email addresses to every domain name that they can get, sending out and seeing what doesn't bounce back.

IMN logo majestic logo threadwatch logo seochat tools logo