Emulating Cpanel's "Last 300 Visitors"

Developers
2008-08-21
2012-10-11
  • Henry the Mild Mannered Janitor

    I've just installed Awstats for a client, and while I'm trying to educate them on the power and beauty of the available stats, all they seem to be able to say is "But I liked the Last 300 Visitors report that Cpanel had".

    I think what they really like about this is the fact that they can see a visitor, and then all the pages they viewed in that session underneath, grouped together.

    Here is the page at Cpanel which describes the information available.
    http://www.cpanel.net/support/docs/11/cpanel/logs_latest.html

    The data is roughly like this:

    Host: 85.99.83.82
    * /index.html
    Http Code: 200 Date: Aug 21 16:43:18 Http Version: HTTP/1.1 Size in Bytes: 24909
    Referer: http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-08585
    Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Seekmo 10.0.406.0)
    * /media/system/js/mootools.js
    Http Code: 200 Date: Aug 21 16:43:20 Http Version: HTTP/1.1 Size in Bytes: 74404
    Referer: http://www.blah.com/?gclid=COeT2qnFnpUCFQWR1QodrnYGkA
    Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Seekmo 10.0.406.0)
    * /media/system/js/caption.js
    Http Code: 200 Date: Aug 21 16:43:23 Http Version: HTTP/1.1 Size in Bytes: 1776
    Referer: http://www.blah.com/?gclid=COeT2qnFnpUCFQWR1QodrnYGkA
    Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Seekmo 10.0.406.0)

    Host: 23.99.83.45
    * /index.html
    Http Code: 200 Date: Aug 21 16:43:18 Http Version: HTTP/1.1 Size in Bytes: 24909
    Referer: http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-08585259
    Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Seekmo 10.0.406.0)

    etc.

    So for each host, you get a list of all the pages the client has visited.

    In fact I'm sure we could even improve on this. If we could specify files to ignore (eg image files and javascript files) and then arrange the pages in time order for each host, then we'd get a very good picture of what was going on. eg.

    Host: 85.99.83.82
    Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Seekmo 10.0.406.0)
    * Aug 21 16:43:18 /index.html Size in Bytes: 24909
    Referer: http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-0858525
    * Aug 21 16:43:20 /news.html Size in Bytes: 24909
    Referer: /index.html

    So my question is first of all, does that information already exist in some form in Awstats? And if not, would building a module be the way forward to get this information out of Awstats?

    If building a module is the solution, are there any resources I could refer to to try my hand at this? I'm not familar with PERL, although I've hacked a few scripts in PHP, ASP, shell etc in the past ...

     
    • Jean-Luc

      Jean-Luc - 2008-08-21

      Hi,

      Have a look at the rawlog plugin. I believe that it is a simplified version of what you are looking for. You can improve it to better suit your needs.

      Jean-Luc
      http://www.internetofficer.com/awstats/

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks