Encrypt Email Addresses - PHP

Published on Jan 16, 2017 & tagged in PHP

The Function

function encode_email($e) {
	for ($i = 0; $i < strlen($e); $i++) { $output .= '&#'.ord($e[$i]).';'; }
	return $output;
}

Usage

echo(encode_email('user@example.com'));

Source

Do you need any help on PHP?

I'm happy to help you. Just fill the form on contact page & I will get back to you within few hours.

Recent Posts

  1. Switch Magento 2 environment mode
  2. Install Magento 2 using composer
  3. Upgrade PHP version to 7 on Ubuntu 14.04 / 16.04
  4. Install Atom text editor - Ubuntu 14.04 / 16.04
  5. Find recently modified, created or accessed files - Linux