Rev 2 | Rev 5 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 3 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | <?php |
1 | <?php |
2 | 2 | ||
3 | // PHP-AntiSpam-Funktion "secure_email", Version 3.05 of 2018-07-20 |
3 | // PHP-AntiSpam-Funktion "secure_email", Version 3.05 of 2018-07-20 |
4 | // von Daniel Marschall [www.daniel-marschall.de] |
4 | // von Daniel Marschall [www.daniel-marschall.de] |
5 | 5 | ||
6 | function secure_email($email, $linktext, $crypt_linktext) |
- | |
7 | { |
- | |
8 | // No new lines to avoid a JavaScript error! |
- | |
9 | $linktext = str_replace("\r", ' ', $linktext); |
- | |
10 | $linktext = str_replace("\n", ' ', $linktext); |
- | |
11 | - | ||
12 | if (!function_exists('alas_js_crypt')) |
6 | if (!function_exists('alas_js_crypt')) |
13 | { |
7 | { |
14 | function alas_js_crypt($text) |
8 | function alas_js_crypt($text) |
15 | { |
9 | { |
16 | $tmp = ''; |
10 | $tmp = ''; |
Line 31... | Line 25... | ||
31 | $text = str_replace('/', '\/', $text); // W3C Validation </a> -> <\/a> |
25 | $text = str_replace('/', '\/', $text); // W3C Validation </a> -> <\/a> |
32 | return 'document.write("'.$text.'");'; |
26 | return 'document.write("'.$text.'");'; |
33 | } |
27 | } |
34 | } |
28 | } |
35 | 29 | ||
- | 30 | function secure_email($email, $linktext, $crypt_linktext) |
|
- | 31 | { |
|
- | 32 | // No new lines to avoid a JavaScript error! |
|
- | 33 | $linktext = str_replace("\r", ' ', $linktext); |
|
- | 34 | $linktext = str_replace("\n", ' ', $linktext); |
|
- | 35 | ||
36 | $aus = ''; |
36 | $aus = ''; |
37 | if ($email != '') |
37 | if ($email != '') |
38 | { |
38 | { |
39 | $aus .= '<script><!--'."\n"; // type="text/javascript" is not necessary in HTML5 |
39 | $aus .= '<script><!--'."\n"; // type="text/javascript" is not necessary in HTML5 |
40 | $aus .= alas_js_write('<a href="'); |
40 | $aus .= alas_js_write('<a href="'); |