|
General Details
|
|
PHP (Hypertext Preprocess...
|
|
Posted 1.94 Year Ago
|
|
409 Views
|
|
Received 0 Ratings
|
|
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. |
|
|
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. :-)
|
More "PHP (Hypertext Preprocessor)" Source Codes By This Author
Recently Posted "PHP (Hypertext Preprocessor)" Source Codes
Recently Rated "PHP (Hypertext Preprocessor)" Source Codes
|