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

  #330  
Старый 24.03.2008, 04:16
Sleep
Участник форума
Регистрация: 31.10.2007
Сообщений: 193
С нами: 9752260

Репутация: 150
По умолчанию

придумано туповато но работает
PHP код:
<?php
set_time_limit
(0)or die ("Время работы скрипта ограниченно");
$file           "dump.sql";    #Файл адресами
$out[0]         = "mail.txt";
$out[1]         = "yandex.txt";
$out[2]         = "gmail.txt";
$out[3]         = "nextmail.txt";
$out[4]         = "rambler.txt";
$out[5]         = "pochta.txt";
$out[6]         = "ru.txt";
$out[7]         = "bk.txt";
$out[8]         = "ukr.txt";
$out[9]         = "wp.txt";
$out[10]        = "other.txt";
$rep[0]         = "#([a-zA-Z0-9-_.])+@(mail.ru)#i";
$rep[1]         = "#([a-zA-Z0-9-_.])+@(yandex.ru)#i";
$rep[2]         = "#([a-zA-Z0-9-_.])+@(gmail.com)#i";
$rep[3]         = "#([a-zA-Z0-9-_.])+@(nextmail.ru)#i";
$rep[4]         = "#([a-zA-Z0-9-_.])+@(rambler.ru)#i";
$rep[5]         = "#([a-zA-Z0-9-_.])+@(pochta.ru)#i";
$rep[6]         = "#([a-zA-Z0-9-_.])+@(ru.ru)#i";
$rep[7]         = "#([a-zA-Z0-9-_.])+@(bk.ru)#i";
$rep[8]         = "#([a-zA-Z0-9-_.])+@(ukr.net)#i";
$rep[9]         = "#([a-zA-Z0-9-_.])+@(wp.pl)#i";
$rep[10]        = "#([a-zA-Z0-9-_.])+@([^yandex|mail|rambler|pochta|bk|ukr|gmail|wp])+([a-zA-Z0-9-.])+\.([a-zA-Z]){2,3}#i";
$a fopen ($file,"r")or die ("Не могу прочитать файл адресами");
while (!
feof($a)):
      
$email fread ($a,1024);


for (
$x=0;$x<=count($rep);$x++)
{
    @
preg_match_all($rep[$x],$email,$outt);
    
$fp fopen (@$out[$x], "a+");
    for (
$xx=0;$xx<=count($outt);$xx++)
    if(@
$outt[0][$xx])@fputs($fp, @$outt[0][$xx]."\n");
}
endwhile;
@
fclose ($a);
@
fclose ($fp);
?>
 
Ответить с цитированием