Hmm. I guess what you could do would be to write a CGI that detects the browser, OS and IP of the client, and then uses this data to write to a statistics file/db, checking beforehand that the IP is unique.

This could probably work well for a small site, with a smallish number of hits - remember that you'd have to maintain a list of every single IP that visits your site, and check against it every single time the index got loaded. That could get very slow very fast, especially with a high-volume site.

Your other problem with using the IP to check uniqueness is that IPs aren't unique. The vast majority of the internet (from a client point of view) uses dynamically assigned IP addresses, not static ones, and hence even if the same IP visits twice, you can't guarantee that it's a unique visitor - it could be someone completely different on the same ISP.

Maybe the easiest way to do something like this would be to use one of the logging tools that's already available, and provide nightly/delayed stats for browser/OS use. Webcounters are trivial to write, if highly inaccurate, as there's no real way to count a "unique" hit.

As far as Apache stats tools go, I'd recommend something like Analog, which is a fairly powerful and customisable analysis tool.

Hope that helps a little ..

-- Foxcub
#include www.liquidfusion.org.uk


In reply to Re: Website Statistics by Tanalis
in thread Website Statistics by debiandude

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.