ColdFusion Tutorial
Make your E-mail address invisible for spam robots
By converting your Email addresses to Unicode, the spam robots can't leech the Email address from your website. Most automatic leeching programs look for the MAILTO tags and properly formatted Email addresses. After using the convert form below, these programs aren't able to detect your Email address. Enter your information in the form below, and copy and past (replace) the Unicode Email address into you web pages. The Unicode mail addresses are standard html code. As you can see the new Email address contains the ASCII value of the characters in your Email address. The browser can read this, so your email addresses will function as normally. But the spam robots can't longer leech your email addresses. The convert form below, does not check if it's a valid email you enter.
This tutorial will give you a hint on how to do that. At the end of this page you find the ASCII characters map.
As an example we will use the following email address: you@server.com
This will give us this html tag: <a href= "mailto:you@server.com">you@server.com</a>
First we convert mailto:
<cfset mailto = "&##109;&##097;&##105;&##108;&##116;&##111;&##58;">
Then we convert the email address:
<cfset email = ?&##121;&##111;&##117;&##64;&##115;&##101;&##114;&##118;
&##101;&##114;&##46;&##99;&##111;&##109?>
Make our new Unicode email:
<cfset Unicode = "<a href = ""#mailto##email#"">you@server.com</a>">
The output of Unicode:
<cfoutput>#Unicode#</cfoutput>
Will display you@server.comin your browser.
If you look at View Source, you will see the following code:
a href= "mailto:you@
serve
r.com">you@server.com</a>
The ASCIIcharacters map:
By converting your Email addresses to Unicode, the spam robots can't leech the Email address from your website. Most automatic leeching programs look for the MAILTO tags and properly formatted Email addresses. After using the convert form below, these programs aren't able to detect your Email address. Enter your information in the form below, and copy and past (replace) the Unicode Email address into you web pages. The Unicode mail addresses are standard html code. As you can see the new Email address contains the ASCII value of the characters in your Email address. The browser can read this, so your email addresses will function as normally. But the spam robots can't longer leech your email addresses. The convert form below, does not check if it's a valid email you enter.
This tutorial will give you a hint on how to do that. At the end of this page you find the ASCII characters map.
As an example we will use the following email address: you@server.com
This will give us this html tag: <a href= "mailto:you@server.com">you@server.com</a>
First we convert mailto:
<cfset mailto = "&##109;&##097;&##105;&##108;&##116;&##111;&##58;">
Then we convert the email address:
<cfset email = ?&##121;&##111;&##117;&##64;&##115;&##101;&##114;&##118;
&##101;&##114;&##46;&##99;&##111;&##109?>
Make our new Unicode email:
<cfset Unicode = "<a href = ""#mailto##email#"">you@server.com</a>">
The output of Unicode:
<cfoutput>#Unicode#</cfoutput>
Will display you@server.comin your browser.
If you look at View Source, you will see the following code:
a href= "mailto:you@
serve
r.com">you@server.com</a>
The ASCIIcharacters map:
| Octal | Decimal | Octal | Decimal | Octal | Decimal | Octal | Decimal |
| ! | 33 | 0 | 48 | A | 65 | ` | 96 |
| " | 34 | 1 | 49 | B | 66 | a | 97 |
| # | 35 | 2 | 50 | C | 67 | b | 98 |
| $ | 36 | 3 | 51 | D | 68 | c | 99 |
| % | 37 | 4 | 52 | E | 69 | d | 100 |
| & | 38 | 5 | 53 | F | 70 | e | 101 |
| ' | 39 | 6 | 54 | G | 71 | f | 102 |
| ( | 40 | 7 | 55 | H | 72 | g | 103 |
| ) | 41 | 8 | 56 | I | 73 | h | 104 |
| * | 42 | 9 | 57 | J | 74 | i | 105 |
| + | 43 | : | 58 | K | 75 | j | 106 |
| , | 44 | ; | 59 | L | 76 | k | 107 |
| - | 45 | < | 60 | M | 77 | l | 108 |
| . | 46 | = | 61 | N | 78 | m | 109 |
| / | 47 | > | 62 | O | 79 | n | 110 |
| ? | 63 | P | 80 | o | 111 | ||
| @ | 64 | Q | 81 | p | 112 | ||
| R | 82 | q | 113 | ||||
| S | 83 | r | 114 | ||||
| T | 84 | s | 115 | ||||
| U | 85 | t | 116 | ||||
| V | 86 | u | 117 | ||||
| W | 87 | v | 118 | ||||
| X | 88 | w | 119 | ||||
| Y | 89 | x | 120 | ||||
| Z | 90 | y | 121 | ||||
| [ | 91 | z | 122 | ||||
| \ | 92 | { | 123 | ||||
| ] | 93 | | | 124 | ||||
| ^ | 94 | } | 125 | ||||
| - | 95 | ~ | 126 | ||||
What is Unicode?
Unicode provides a unique number for every character,
no matter what the platform
no matter what the program
no matter what the language
Using JavaScript
An alternate way to make your e-mail link safe is using JavaScript. In the example below we use String.fromCharCode(32*2) to insert the @ sign. A combination of the both methods can be done. Remember that some users turn of JavaScript in the browser. If you want to notice this little group, add some code in the <noscript> section. Here you can use a picture of your e-mail address or write text to explain that JavaScript is necessary.
<script language ="javascript" type = "text/javascript">
user = 'your_name'
domain = 'your_domain'
link_name = 'e-mail'
safe_link = user + String.fromCharCode(32*2) + domain
document.write('<a href = "mailto:' + safe_link + '">' + link_name + '</a>')
</script>
ColdFusion Tutorial test
Make your E-mail address invisible for spam robots
No User Comments.
No User Comments, be the first one to write your comments?
