3,36 → 3,36 |
// PHP-AntiSpam-Funktion "secure_email", Version 3.05 of 2018-07-20 |
// von Daniel Marschall [www.daniel-marschall.de] |
|
function secure_email($email, $linktext, $crypt_linktext) |
if (!function_exists('alas_js_crypt')) |
{ |
// No new lines to avoid a JavaScript error! |
$linktext = str_replace("\r", ' ', $linktext); |
$linktext = str_replace("\n", ' ', $linktext); |
|
if (!function_exists('alas_js_crypt')) |
function alas_js_crypt($text) |
{ |
function alas_js_crypt($text) |
$tmp = ''; |
for ($i=0; $i<strlen($text); $i++) |
{ |
$tmp = ''; |
for ($i=0; $i<strlen($text); $i++) |
{ |
$tmp .= 'document.write("&#'.ord(substr($text, $i, 1)).';");'; |
} |
return $tmp; |
$tmp .= 'document.write("&#'.ord(substr($text, $i, 1)).';");'; |
} |
return $tmp; |
} |
} |
|
if (!function_exists('alas_js_write')) |
if (!function_exists('alas_js_write')) |
{ |
function alas_js_write($text) |
{ |
function alas_js_write($text) |
{ |
$text = str_replace('\\', '\\\\', $text); |
$text = str_replace('"', '\"', $text); |
$text = str_replace('/', '\/', $text); // W3C Validation </a> -> <\/a> |
return 'document.write("'.$text.'");'; |
} |
$text = str_replace('\\', '\\\\', $text); |
$text = str_replace('"', '\"', $text); |
$text = str_replace('/', '\/', $text); // W3C Validation </a> -> <\/a> |
return 'document.write("'.$text.'");'; |
} |
} |
|
function secure_email($email, $linktext, $crypt_linktext) |
{ |
// No new lines to avoid a JavaScript error! |
$linktext = str_replace("\r", ' ', $linktext); |
$linktext = str_replace("\n", ' ', $linktext); |
|
$aus = ''; |
if ($email != '') |
{ |