Coder Profile - Show off your skills, get a coder profile.
 
 
 
The Author
otoom
Ant
Send A Message
Rating
Not
Rated
Please login to rate source codes.

Click here to register a free account with us.
General Details
PHP (Hypertext Preprocess...
Posted 3.36 Years Ago
560 Views
Received 0 Ratings
More Codes By This Author
Guessing Game
Even or Odd
Even or Odd
Head First PHP And mySQL...
CreateSquare
Articles By This Author
Quick Threading Tutorial...
First look at C
Cheat Sheet Pack
[PHP] How to make a log f...
HTML Cheat Sheet!

Unique Hits


Description
My own way of making a unique hits counter.
Thank you Relish for figuring out why the numbers wouldn't show.
Technical
PHP
Source Code
Comments
Please login to post comments.
 
Tommey     Posted 2.85 Years Ago
 
 
I think there's a little problem with this script.
The ips.txt file is not correctly assembled. :-)
Let's see and example:
- you have already two IPs: 88.120.51.10 and 89.95.53.35
- ips.txt will contain: 88.120.51.1089.95.53.35
The problem is when a user comes with IP 88.120.51.108, the eregi() will match it
and however it is a really unique IP from the already existing two IPs, the script
will not count it.
You should put a separator between the IPs.

And there's another thing: you can do the whole functionality with 1 file,
ips.txt, if you use newline for IP separator, because then you could count the IPs
and get the same number that you store in the hits.txt -- although in this case it
can be happen (in special cases) that ips.txt has 8 IPs and hits.txt contains 5 or
something, this would lead to inconsistency. :-)
Page 1 of 1
More "PHP (Hypertext Preprocessor)" Source Codes By This Author
Recently Posted "PHP (Hypertext Preprocessor)" Source Codes
Recently Rated "PHP (Hypertext Preprocessor)" Source Codes
 
 
Latest News About Coder Profile
Coder Profile Poll
If you made money from keeping your profile up to date, say $30 and up, per month. What extra time would you spend on your profile?

No extra time
A few hours at weekends
A whole day each week
Every minute i can get free


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
3.20 Years Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright © 2007 - 2012, Scott Thompson, All Rights Reserved