You're not being very clear so I am going to try an answer your question as best as I can

If you are trying to put a counter on a webpage, I wouldn't. Counters have not been "in style" for a long time and IMO look "amateurish" on a page.

If you want to track visitors for reporting. Cookies have a couple of problems (well truthfully all methods of tracking visitors have problems, but that's a different problem). Cookies can be turned off or cookies can be deleted before expiration. You also have to write special handling to track visitors by cookies.

I would recommend getting a logfile analysis program to get visitor counts. They should give you a reasonable unique visitor count (based on IP). Of course this has a couple of flaws. Several people behind a NAT'd firewall will show up as 1 visitor and people who don't have static IP's (dial-up users will generally get a new IP every time and Cable users will get a new IP every month or so).

Check out AWStats or Analog, both are good

grep
XP matters not. Look at me. Judge me by my XP, do you?


In reply to Re: how to counter visiters? by grep
in thread how to counter visiters? by zhshqzyc

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.