Results 1 to 2 of 2
  1. #1
    Post invisible 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

  2. #2

    muso's Avatar
    Member Since
    Jan 15, 2003
    Whangarei, New Zealand
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Cookie control
    By Wrinkly Ninja in forum macOS - Operating System
    Replies: 10
    Last Post: 10-18-2012, 07:07 AM
  2. cookie stumbler
    By vivienne61 in forum Switcher Hangout
    Replies: 5
    Last Post: 12-30-2011, 03:31 AM
  3. Cookie problem
    By max1baer in forum macOS - Operating System
    Replies: 2
    Last Post: 08-17-2011, 01:07 AM
  4. iGoogle cookie?
    By jam2000 in forum macOS - Operating System
    Replies: 2
    Last Post: 02-16-2009, 10:19 PM
  5. iWeb page counter not using .Mac
    By MMMII in forum Web Design and Hosting
    Replies: 0
    Last Post: 05-22-2007, 05:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts