Показать сообщение отдельно

  #2  
Старый 17.01.2008, 16:50
groundhog
Познавший АНТИЧАТ
Регистрация: 12.05.2007
Сообщений: 1,235
Провел на форуме:
2238549

Репутация: 1318


Отправить сообщение для groundhog с помощью ICQ
По умолчанию

Ну воспользуйся моей разработкой:

PHP код:
    function protect_email($tpl_output) {
        if (
preg_match_all('/[a-z0-9\._-]{2,}@[a-z0-9\._-]{2,}\.[a-z]{2,6}/i'$tpl_output$matches)) {
            foreach(
$matches[0] as $email) {
                
$key rand (1255);
                
$result '';
                for(
$i 0$i strlen($email); $i++, $result .= $i != strlen($email) ? ';' '')
                    
$result .= strval(ord($email[$i]) ^ $key);
                
$code  "<script>x=String('{$result}').split(';');for(i=0,z='';i<x.length;i++)";
                
$code .= "z+=String.fromCharCode(x[i]^{$key});document.write(z);</script>";
                
$tpl_output str_replace($email$code$tpl_output);
            }
        }

        return 
$tpl_output;
    } 
З.Ы. Меняешь регулярку на поиск нужной тебе строки, и на выходе она будет закодирована...
 
Ответить с цитированием