Because I have almost no self-control, and because I've been up to my neck in log parsers these days, I started writing a full-on Perl widget after reading this post. The PHP approach is, although I am generally loathe to admit this sort of thing, about a million times easier and more elegant.