Home  >  Article  >  Backend Development  >  php function to encode email address

php function to encode email address

WBOY
WBOYOriginal
2016-07-25 09:07:301085browse
  1. function encode_email($email='test@jbxue.com', $linkText='Contact Us', $attrs ='class="emailencoder"' )

  2. {
  3. // remplazar aroba y puntos
  4. $email = str_replace('@', '@', $email);
  5. $email = str_replace('.', '.', $email);
  6. $email = str_split($email, 5);

  7. $linkText = str_replace('@', '@', $linkText);

  8. $linkText = str_replace('.', '.', $linkText);
  9. $linkText = str_split($linkText, 5);

  10. $part1 = '';

  11. $part4 = '';

  12. $encoded = '';

  13. return $encoded;

  14. }
  15. ?>

复制代码


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn