Zend - The PHP Company




Code Gallery: munkfish


Apache Web Server Log File Display Script  

Type: application
Added by: munkfish
Entered: 12/09/2001
Last modified: 09/12/2000
Rating: - (fewer than 3 votes)
Views: 8759
Parses an apache web server log file and displays each entry to the browser in html tables. Allows for filtering of output based on the 'status' field of the logfile entry (ie 404, 200, 304 etc). Still basic and obviously not recommended for users with low bandwidth and large logfiles(!). I did this because I couldn't find any existing scripts - plus I learnt a bit about log files in process. More than likely you will have to change the way the script extracts the logfile fields from each line, but at least the script gives you an idea how you could do it... I have a simpler version of the script which doesn't do filtering (just outputs two tables - 'success' and 'failure'(though failure includes 304 as well as 404 page requests)). This is perhaps easier to read - email me if you want it.




Search