Advertisement
Guest User

Untitled

a guest
Jan 12th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.20 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL);
  3. ignore_user_abort(true);
  4. ini_set('display_errors', 'on');
  5. ini_set('error_log','error_log.txt');
  6. header('Content-Type: text/html; charset=UTF-8');
  7.  
  8. require_once('../api4door/db/conf.php');
  9.  
  10. // функция генерации рандомной хуйни:
  11. function randsub($count) {
  12. $symbols = "qwertyuiopasdfghjklzxcvbnm1234567890";
  13. $word = ''; $i = 0;
  14. $count = $count - 1;
  15. while($i<=$count) {  
  16. $word .= $symbols[mt_rand(0, strlen($symbols)-4)];
  17. $i++;  
  18. }
  19. return $word;  
  20. }
  21.  
  22. // домены:
  23. $doorhost = file('../api4door/db/url.txt');
  24. shuffle($doorhost);
  25.  
  26. $i = 1;
  27. foreach ($doorhost as $line) {
  28. $dor = randsub($subsize).'.'.trim($line);
  29. $linkhost[] = '<a href="http://'.$dor.'/">'.$dor.'</a> ';
  30. $i++;
  31. if ($i == 25) break;
  32. }
  33.  
  34. $nosub = file('../api4door/db/nosub.txt');
  35. shuffle($nosub);
  36. $i = 1;
  37. foreach ($nosub as $line) {
  38. $line = trim($line);
  39. $linkhost[] = '<a href="http://'.$line.'/">'.$line.'</a> ';
  40. $i++;
  41. if ($i == 10) break;
  42. }
  43.  
  44. $linkhost = implode("\n ", $linkhost);
  45.  
  46. echo '<!DOCTYPE html>
  47. <html lang="ru">
  48.  <head>
  49.    <meta charset="utf-8">
  50.    <title>Карта сайта</title>
  51.  </head>
  52.  <body>'.$linkhost.'</body>
  53. </html>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement