I am trying to get a unique hit counter working based on IP addresses as it's the only way I can think of identifying unique users.
Basically what i am doing is taking the ip they view the page with and checking it against a file that includes a list of all the other ip's that have viewed the page. If the new ip isn't listed it is added to the file and the number of hits is incremented by 1.
I am having trouble getting the while loop to run through the file of ip addresses. the error and code follow, the error occurs in the while statement.
Parse error: syntax error, unexpected '[' in /home2/whackand/public_html/blog/index.php on line 21
I would recommend using a analytics program instead. It will give you more information and will help you market your website. It is not a good idea to display the 'hits' your website has, but if you really want this feature with Google Analytics you can also export this data to a web page give you features of analytics and easy export of the data you want.