piterskiy

Linking from file

Jul 8th, 2018
23,088
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // вывод 3 ссылок из файла. в файл doors.txt построчно прописать домены вида door.ru
  3. $doors = file('doors.txt');
  4. shuffle($doors);
  5. $i = 0;
  6. foreach($doors as $line) {
  7. echo '<a href="http://'.trim($line).'/">'.trim($line).'</a> ';
  8. if ($i == 3) break;
  9. $i++;
  10. }
  11. ?>
Add Comment
Please, Sign In to add comment