Apache Log Analyzer 2 Feed

apachelog2feed

If you like to follow everything using your feed reader, you might also want to read your Apache log in feed. Well, you need to try Apache Log Analyzer 2 Feed.

ApacheLogAnalyzer2Feed is an object oriented class, written in PHP 5, for parsing/filtering an Apache log file and convert it into feed.

You can filter out which part of your Apache log you’d like to see. For example, you can generate a feed that shows you when Google Bot visit your blog or when your visitor register, etc. See some sample codes here.

Here’s the sample output from my Apache log,


<rss>
<channel>
<title>Log /usr/local/apache2/logs/access_logs filtered by 1 filters</title>
<description>Array
(
    [0] => Array
        (
            [0] => Request
            [1] => regexp:generator\.php
            [2] => IS
        )

)
</description>
<link>/log.php</link>
<lastbuilddate>Wed, 06 Jun 2007 21:20:08 +0100</lastbuilddate>
<generator>FeedCreator 1.7.2-ppt ([email protected])</generator>
<item>
<title>192.168.1.99 - GET /generator.php HTTP/1.0</title>
<link>/log.php</link>
<description>Array
(
    [Remote-Host] => 192.168.1.99
    [Remote-Logname] => -
    [Remote-User] => -
    [Time] => [06/Jun/2007:21:17:26 +0700]
    [Request] => GET /generator.php HTTP/1.0
    [Final-Status] => 200
    [Bytes-Sent] => 9274
    [Referer] => -
    [User-Agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
)
</description>
<pubdate>Wed, 06 Jun 2007 21:17:26 +0100</pubdate>
<guid>b27435fba04c82a72e084d0404bc442b</guid>
</item>
<item>
<title>192.168.1.99 - GET /generator.php HTTP/1.0</title>
<link>/log.php</link>
<description>Array
(
    [Remote-Host] => 192.168.1.99
    [Remote-Logname] => -
    [Remote-User] => -
    [Time] => [06/Jun/2007:21:20:02 +0700]
    [Request] => GET /generator.php HTTP/1.0
    [Final-Status] => 200
    [Bytes-Sent] => 9274
    [Referer] => -
    [User-Agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
)
</description>
<pubdate>Wed, 06 Jun 2007 21:20:02 +0100</pubdate>
<guid>005091851cf9b076180c57ff3c5ea081</guid>
</item>
</channel>
</rss>

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.