Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need a little advanced cgi counter script

Status
Not open for further replies.

c4n

Programmer
Mar 12, 2002
110
SI
I need an advanced CGI counter that would count unique visitors.

What I want it to do is:
- store visitor's IP address in a seperate file
- if this is a new address the counter then counts +1
- if this visitor already visited my site it doesn't count him

Could anybody help me out with this (= vrite such a script or give me a link to an existing one)?

Thanks in advance!
 
That's not going to work very well. Most ISPs assign a dynamic IP address when you log onto the service, so the same person could have an different IP address every time they access your site. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
What about a counter that would use both IP and cookies for counting unique visitors? I know people often delete their cookies but it should give me a much better picture of how many unique (and I mean unique) visitors come to my site, shouldn't it?

Do you know of any such counter?
 
I don't know of one, but it shouldn't be hard to write one. If you use a cookie you shouldn't even have to worry about the IP address, unless you're curious about where they came from too. Otherwise, if they have the cookie, they've been there before, so don't increment the counter. If they don't have the cookie, you DO increment the counter. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top