1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Can I create an email address within HTML?

Discussion in 'General Internet' started by Roger at CCCC, 2008/01/14.

  1. 2008/01/14
    Roger at CCCC

    Roger at CCCC Inactive Thread Starter

    Joined:
    2003/05/22
    Messages:
    234
    Likes Received:
    0
    I help support a simple website that sends an email message to its owner. The spam bots have apparently found this web page and its embedded email address because we get a lot of spam at this address.

    The HTML line looks like this:
    <a href= "mailto:marylou@gmail.com ">marylou@gmail.com</a>

    Can I somehow create an email address within the HTML without explicitly coding the email address, thereby avoiding the spam bots? Or is there some other way for a webpage to send to an email address without explicitly revealing what that address is in the HTML?

    I am aware of the technique where the webpage user is asked to enter a few characters as a way of insuring that a human being is doing it. I don't want to add that extra complication if there is some other way to do it.

    Thanks for any suggestions.
     
  2. 2008/01/15
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    You can use javascript or php, or better yet a php form. But javascript will suffice. Just replace the mailto section of code with the below.

    Code:
    <script language= "JavaScript ">
    <!-- Hide me from older non-JavaScript-enabled browsers
    var name =  "YOUR-NAME ";
    var atsign =  "@ ";
    var virtual_domain =  "DOMAIN ";
    var dotcom =  ".COM ";
    document.write( "<a href=mailto: ", name + atsign + virtual_domain + dotcom,  ">THIS-IS-THE-CLICKABLE-TEXT</a> ");
    // -->
    </script>
    For THIS-IS-THE-CLICKABLE-TEXT don't use the actual email address! Use text like NAME AT DOMAIN DOT COM. Any text will do so long as don't use the @ symbol. BOTS seek out that symbol.
     

  3. to hide this advert.

  4. 2008/01/15
    Roger at CCCC

    Roger at CCCC Inactive Thread Starter

    Joined:
    2003/05/22
    Messages:
    234
    Likes Received:
    0
  5. 2008/01/22
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    You can hide things further by encoding the addresses. For example, by converting the letters in the e-mail address components, to their Hex equivalents. Server side systems such as PHP and Ruby on Rails have function that will do this for you (see this and this for example).

    If this is a static page you'll have to work out the hex equivalents for the address components yourself, but there are tools to help you with this. Do a google search for 'ascii to hex' and you'll get plenty of applications, like this one.
     
  6. 2008/01/22
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
  7. 2008/01/23
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    Nice link Tony.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.