Home > Backend Development > PHP Tutorial > php function to encode email address

php function to encode email address

WBOY
Release: 2016-07-25 09:07:30
Original
1101 people have browsed it
  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. ?>

复制代码


source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template