1

Is there any WebApp that allows you to publish an e-mail on the web using a script tag that protects it from robots?

To be more clear: I want to publish a post on Blogspot that prints my e-mail on the screen as a selectable and copyable text, but hides it from the HTML source code. This is an anti-spam technique.

I imagine the solution is some javascript that fetches the e-mail address from a server, or that decrypts it from existing data. I know this could be a programming question if the solution doesn't need no server-side programming, but I'm not sure about this.

| improve this question | | | | |
2

There are a bunch of sites that generate the code. It generally entails breaking up the email address into a few variables, and then writing them to the screen. Simple example:

<script type="text/javascript">
    dot = "."
    part1 = "john"
    part2 = "doe"
    part3 = "gma"
    part4 = "il"
    part5 = "co"
    part6 = "m"

    document.write( part1 + dot + part2 + "@" + part3 + part4 + dot + part5 + part6

    //returns john.doe@gmail.com
</script>

More complex options will convert each letter into the HTML element.

Check out http://www.mobilefish.com/services/hideemail/hideemail.php#hideemail_input as an example

| improve this answer | | | | |
  • I like the service you linked because I don't have to code to use it. But I also would like to see more services like it. – Jader Dias Oct 13 '10 at 2:43
  • 1
    There are a bunch out there. Search for things like email obfuscation, javascript anti-spam email address, etc. Add the word "generator" on to the search if you just want an app and not the tutorial part. Glad to help! – hookedonwinter Oct 13 '10 at 2:47
2

I use the Hivelogic enkoder.

| improve this answer | | | | |
0

We use a VB Function to generate the mail addresses. It encodes the addresses to UTF-8 or hex. You can convert it to any language you wish. This is the VB.NET code:

' Convert An Input String To Unicode Character Codes
Public Enum CloakType
    UTF8_1
    UTF8_2
    HEX_1
    HEX_2
    UniCode
End Enum

Public Function CloakIt(ByVal inTxt As String, ByVal iType As CloakType) As String
    Dim iInd As Integer
    Dim sOut As String
    sOut = ""
    If Len(inTxt) = 0 Then
        CloakIt = ""
        Exit Function
    End If
    For iInd = 1 To Len(inTxt)
        Select Case iType
            Case CloakType.UTF8_2 ', 2
                ' Long UTF-8 encoding without semicolons
                sOut = sOut & "&#" & Right("0000000" & CStr(Asc(Mid(inTxt, iInd, 1))), 7)
            Case CloakType.HEX_1 ', 3
                ' Hex encoding without semicolons
                sOut = sOut & "&#x" & Hex(Asc(Mid(inTxt, iInd, 1)))
            Case CloakType.HEX_2 ', 4
                ' Hex encoding with semicolons
                sOut = sOut & "&#x" & Hex(Asc(Mid(inTxt, iInd, 1))) & ";"
            Case CloakType.UniCode ', 5
                ' Unicode 2 Byte Hex encoding with semicolons
                sOut = sOut & "&#x00" & Hex(Asc(Mid(inTxt, iInd, 1))) & ";"
            Case Else
                ' UTF-8 Unicode Encoding
                sOut = sOut & "&#" & CStr(Asc(Mid(inTxt, iInd, 1))) & ";"
        End Select
    Next
    CloakIt = sOut
End Function
| improve this answer | | | | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.