PHP encoded email address
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-25 09:07:46
Original
1264 people have browsed it
- Using this code, any email address can be encoded as an html character entity to prevent it from being collected by spam programs.
- function encode_email($email='info@domain.com', $linkText='Contact Us', $attrs ='class="emailencoder"' )
- {
- // remplazar aroba y puntos
- $email = str_replace('@', '@', $email);
- $email = str_replace('.', '.', $email);
- $email = str_split($email, 5);
-
- $linkText = str_replace ('@', '@', $linkText);
- $linkText = str_replace('.', '.', $linkText);
- $linkText = str_split($linkText, 5);
-
- $part1 = '< ;a href="ma';
- $part2 = 'ilto:';
- $part3 = '" '. $attrs .' >';
- $part4 = '';
-
- $encoded = '';
-
- return $encoded;
- }
-
Copy code
|
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
Latest Articles by Author
-
2025-02-26 03:58:14
-
2025-02-26 03:38:10
-
2025-02-26 03:17:10
-
2025-02-26 02:49:09
-
2025-02-26 01:08:13
-
2025-02-26 00:46:10
-
2025-02-25 23:42:08
-
2025-02-25 22:50:13
-
2025-02-25 21:54:11
-
2025-02-25 20:45:11
Latest Issues
-
2025-03-18 17:12:12
-
2025-03-14 11:44:41
-
2025-03-14 11:42:06
-
2025-03-14 11:06:10
-
2025-03-13 12:08:12