PHP code:
<?
$things = file('server.log');
$chats = Array();
foreach ($things as $thing) {
if (strpos($thing, "[INFO] <")) {
$chats[] = "[" . substr($thing, 11, 5) . "]" . htmlspecialchars(substr($thing, 27));
} else if (strpos($thing, "[dynmap]")) {
$thing = str_replace(": ?", ": ", $thing);
$chats[] = "[" . substr($thing, 11, 5) . "]" . htmlspecialchars(substr($thing, 37));
}
}
$chatt = implode("<br />", array_slice($chats, -30));
echo $chatt;
?>
I dunno if those question marks are really there or just an artefact of pasting? If they're not really there the character counts might be out. If they are, then if someone really says ": ?" via the web interface it'll be filtered out (because it's going to be so rare that I can't be arsed to code around it).
That aside, that should work. If you want seconds on the timestamps change those two instances of 11, 5 to 11, 8