I don't think that checking the IP of the present visitor against all IP's which have already visited your site would get really slow.

The only way to get a value for unique IP's which have visited your site is by putting the IP-numbers which have visited you in a database.

Something like MySQL is probably the fastest solution although you could do it easily with any type of database which has a DBI/DBD interface.

Checking and updating your database will be very fast as you can index on the field containing the IP. If you run it under Apache and mod_perl, you can even have persistent database connections so you save on the connect/disconnect overhead and the script stays "compiled" in between hits.

Whether the values you obtain have any meaning is altogether another issue as there is no sure-fire way to link IP's to people.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law


In reply to Re: Re: Re: Website Statistics by CountZero
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.