Welcome to the Celtnet Internet Fraud Page for the Free eMail Obfuscation Tool



Share on Facebook
Welcome to the Celtnet Internet Fraud and Scams Page for the Free email address obfuscation tool — though internet frauds and scams can be perpetrated in many ways, the majority are initiated in the form of unsolicited emails. This is why, it is vital that you always secure your emails and do not give them out to anyone else. This can be difficult if you have an internet presence and need to supply your email address.

Email communication is vital these days and you need to ensure that people can contact you. But if you provide your email address on web pages 'in the clear' then that makes it easy for automated programs to harvest. That's why I developed this email obfuscator. It's a simple little program that encodes your email address in such a way that web spiters and bots simply cannot understand it as an email address in the code, but when a human views your email page and cuts and pastes your email address they just see an ordinary address. The coding is difficult, but this is simple to implement on your own site and I'm making the code available for free here. I'm also allowing anyone to use this system to hide their own email addresses to use this system to help secure their email address.

The eMail Obfuscator

The only problem with the JavaScript e-mail obfuscating script presented on this site already is that you have to embed JavaScript into your web page for it to work. I've been looking for an alternative and I have found one in a php script that obfuscates your email address by re-shuffling and then uses plain CSS to make it apear in the web page as a normal email address that people can cut and paste though the underlying code is obfuscated and your email cannot be harvested by automated email harvesters.

To use the code generated simply copy and paste into your own web page but remember to add the CSS code to the page or all you will see is gibberish! An example of what your encoded email looks like to a visitor to your site is given beneath the code that's been generated.

Remember, however, that if you want to print out the email address (and for it to actually look like a real email address in your browser) you will need to add the following CSS code either to your CSS file or to your HTML page (or HTML-based eMail). I actually add this to the HTML page itself just before the end of the </head> tag:

<style type="text/css">
.mstag{position:absolute; font-family:monospace;margin:0.45em;background-color:#fcc};
</style>

You now have everything you need to deploy the php code on your own website. But if you don't want to deploy the entire code you can use the form below to generate the code that will allow you to generate code to obfuscate your own e-mails.

Running the Code Yourself

The code for generating the obfuscated email address is based on that of Daniel Hjerth whith a few changes of my own. This code is given below:

    function mailshuffle( $mail ) {

       $output = array();

       $element = "span";
       $spacing = 'round($x/1.75, 2)';
       $class = "mstag";
       $spacing_attribute = "left";
       $spacing_type = "em";

          for ($x=0; $x<strlen($mail); $x++)
          {
             eval('$i = '. $spacing . ";");
             $output[] =
              "<{$element} class='{$class}' style='{$spacing_attribute}:{$i}{$spacing_type};'>".htmlentities($mail{$x})."</{$element}>";

          }

          if(function_exists("shuffle_variable"))
          {
             shuffle_variable(&$output);
          }
          else
          {
             mt_srand( (double) microtime() * pow(10,5) );
             $array_size = count($output);
             for($x=0; $x<$array_size; $x++)
             {
                $n = mt_rand(0, $array_size - 1);
                $p = $output[$n];
                $output[$n] = $output[$i];
                $output[$i] = $p;
             }
          }

             return "<div style='position:absolute;'>".implode("",$output)."</div>";
    }


To get this function to work you will need to call it with something like: echo "<p>".mailshuffle($Email)."</p><br/><br/>"; (where $Email is the email you want to obfuscate) which both calls the function with your email address and prints the result to your web page.

Also, remember that you will need to add the following CSS code

<style type="text/css">
.mstag{position:absolute; font-family:monospace;margin:0.45em;background-color:#fcc};
</style>


to any web page where you want the code to disply as an email address.





Not found what you're looking for? Search the web:



You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by RAND() limit 10' at line 1