Thread: invisible cookie page counter
05-16-2004, 04:31 PM #1design2Guestinvisible cookie page counter
you know how 'hits' are the number of time the page is viewed regardless of whether its the same person viewing the page or the page being refreshed, is there an easy way using cookies to setup a counter that only counts each ip / host once, cos i would like to add something like this to my site as an invisible code and view it to see how many different people see it. thanks
05-17-2004, 05:07 PM #2
I'd say go with a premade script, you'll get a lot more features. If you get your own domain name sometime in the future, there's a 99% chance you'll get a slew of different statistics scripts. They'll give you graphs, ip addresses, pages most visited/downloaded and tell you what country your visitors come from.
If you want to install a premade one, there are plenty at HotScripts - I suggest you make their PHP section a bookmark - in particular, take a look at BBclone.
If you want to write your own, all you'd need is a simple if() statement. Basically you'd check if the cookie doesn't exist, if so, add one to the hit counter, then print the hit counter out to a file or html page. I can't remember the syntax to set a cookie off the top of my head but I'll post it here later if you like.I'm in your forums, writing sentences in a grammatically acceptable manner.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By Wrinkly Ninja in forum OS X - Operating SystemReplies: 10Last Post: 10-18-2012, 07:07 AM
By vivienne61 in forum Switcher HangoutReplies: 5Last Post: 12-30-2011, 03:31 AM
By max1baer in forum OS X - Operating SystemReplies: 2Last Post: 08-17-2011, 01:07 AM
By jam2000 in forum OS X - Operating SystemReplies: 2Last Post: 02-16-2009, 10:19 PM
By MMMII in forum Web Design and HostingReplies: 0Last Post: 05-22-2007, 05:35 PM