Small PHP Reader for mIRC logs

Scripting is fun


Quite recently I was forced to set my OS back up. When I moved old files after that, I came across some pretty old logs from IRC and ended up chatting about the good old times. It's just a shame that the log reader in mIRC is not all that great. I wanted a prettier one, ideally searchable and sorted.
Since I have largely finished the first proper version of the CMS this website runs on, I finally had some time to do some other programming again. And thus I ended up implementing at least a very basic version of it. Below you find the code.

If anyone wants to use this: the basic concept is that you have all the logs you want to read in one directory (./logs in the same directory as the script). This directory is then read and all files (which means the log for each channel or PM chat et cetera) are linked. After selecting one of these, the given .log file is parsed into HTML. I also added some additions like a very simple parser for links and splitting up of sessions (that's also the level of searchability the tool offers so far...). The whole thing happens in PHP, so you might want to emulate an Apache on your maschine (or run it online and make sure to add very good security measures - privacy matters).

Update (2015-09-17): There are still some problems with my CMS displaying PHP code without executing it and giving awkward results. Usually any PHP is filtered out of posts for security reasons and previous reasons of this post had the code entered manually. I now moved it to a separate file.