WarpConduit Computing

  • Quick Tips
  • Web Design & Development
  • WordPress Plugins
  • Home
  • Passphrase Generator
  • Password Generator
  • About
  • Contact

mailto: Email Link Obfuscation (Hiding)

April 1, 2010 by Josh Hartman

After searching for a good email link obfuscation script that allows the address to be seen as normal text i came upon a webpage that had a good solution, so i did a little reverse engineering and created this PHP script to output the same code, enjoy!

$v){
            $domain_array[$k] = strToHex($v,'%');
        }
        $domain = "'".implode("','",$domain_array);
        $domain .= "'";
        $output = $var1."=['".$user."',[".$domain."].reverse().join('.')].join('@');".$var2."=unescape(".$var1.");document.write(".$var2.".link('mai'+'lto:'+".$var1."));";
        $output = "";
        echo $output;
    }else{
        return false; //email address is not valid
    }
}

mailto_link('username@domain.com'); //use this function wherever you want an email link
?>

Filed Under: Web Design & Development Tagged With: email, link, mailto, obfuscation, php

Connect

  • Facebook
  • GitHub
  • RSS
  • Twitter
  • YouTube

Recent Posts

  • Extremely Useful Applications for Web Development and IT Tasks
  • Installing BookStack Wiki on cPanel Shared Hosting
  • Media (MIME) Type Reference List

Tags

automatic benchmark cbc cipher class comparisons cpanel credit memo css decrypt encrypt font gzip htaccess html image increment javascript jquery list magento mcrypt mysql number old opencart order php profiling random redirect repository rijndael shipment software strict ubuntu url wincachegrind windows windows 7 wordpress xampp xdebug xss

Blogroll

  • CodeIgniter
  • Fusion Forward
  • jQuery
  • Nettuts+
  • Smashing Magazine

© 2023 WarpConduit Computing. All Rights Reserved.