1. <?php
  2. $file = "c:/progra~1/abyssw~1/access.log";
  3. $fp = fopen($file, 'r');
  4.  
  5. // You can specify the amount of last bytes in the query string - ex: ?4000
  6. $int = (int) $_SERVER['QUERY_STRING'];
  7. if ($int > 0)
  8. {$last = 0 - $int;} else {$last = -3000;} // default amount of last bytes to read
  9.  
  10. fseek($fp, $last, SEEK_END);
  11. $data = fread($fp, (0 - $last));
  12. fclose($fp);
  13. ?>
  14.  
  15. <PRE>
  16. <?php
  17. // Start the data on the second line - to avoid chopping the first line
  18. echo strstr($data, "\n");
  19. echo "\n\nBytes reported: ".strlen(strstr($data, "\n"));
  20. ?>
  21. </PRE>