Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $lines = file('url.txt'); // строки файла в массив
- foreach ($lines as $line_num => $line) {
- $html_lines = file("$line"); //cуем в file url и получаем массив со строками хтмл
- foreach ($html_lines as $line_num => $line)
- {
- preg_match('/([a-z0-9_\.\-])+\@(([a-z0-9\-])+\.)+([a-zа-я0-9]{2,4})+/i', $line, $matches); //выдираем мейлы из html
- foreach($matches as $key => $val) // cохраняем массив найденных мейлов в файл
- {
- $save = $val."\n";
- file_put_contents('mail.txt', $save, FILE_APPEND);
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment