Accurate hit counter


I’m in the process of creating a hit counter (number of visitors counter) using Flash. I already seen the PHP based counter here on but it is not accurate enough as it will increment upon each page refresh. I would like to get a more accurate statistic about the number of different visitors rather than the number of page loads.

What I was thinking about was getting and storing the IP addresses and only incrementing the counter if the IP address is not yet known. This will give a higher accuracy but is still not perfect. Does anyone have any better idea?

Many thanks in advance for your help!