Просмотр файла www/found_684.php

Размер файла: 0.99Kb
  1. <?php
  2. header('Content-Type: text/html; Charset=windows-1251');
  3. $sitespath="/home/kmx/www/sites";
  4.  
  5. $cnt=1;
  6. if ($sitestream = @opendir($sitespath))
  7. {
  8. while (false !== ($site = readdir($sitestream)))
  9. {
  10. if ($site!="." && $site!=".." && is_dir($sitespath."/".$site))
  11. {
  12. if ($filestream = @opendir($sitespath."/".$site))
  13. {
  14. while (false !== ($files = readdir($filestream)))
  15. {
  16. if (is_file($sitespath."/".$site."/".$files)&&(substr($files,-4)=='.wml'))
  17. {
  18. $f=fopen($sitespath."/".$site."/".$files,'r+');
  19. $tmp=fread($f,4096);
  20. if ((
  21. strpos($tmp,' 684')||strpos($tmp,'684 ')||strpos($tmp,'>684')||strpos($tmp,'684<')||
  22. strpos($tmp,' 685')||strpos($tmp,'685 ')||strpos($tmp,'>685')||strpos($tmp,'685<')
  23. )&&(!strpos($tmp,'id="moderpage"')))
  24. print ($cnt++).'. <a href="http://kmx.ru/mod684.php?p='.$site."/".$files.'">'.$site.'.kmx.ru/'.$files.'</a><br>';
  25. fclose($f);
  26. }
  27. }
  28. }
  29. }
  30. }
  31. }
  32. exit;
  33. ?>