Encode Email against spammers

/ Published in: PHP
Save to your folder(s)

this is not the ultimate secure way, but it's at least not displaying the email link

Copy this code and paste it in your HTML
  1. function encode_email($e)
  2. {
  3. for ($i = 0; $i < strlen($e); $i++) { $output .= '&#'.ord($e[$i]).';'; }
  4. return $output;
  5. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.