Page 1 of 1

Block my own IP in stats

Posted: Mon Aug 25, 2008 10:03 am
by the_julle
Script URL: http://www.phpjunkyard.com/php-click-counter.php
Version of script: 1.2
What terms did you try when SEARCHING for a solution: block ip, ip

Write your message below:

Hello.
Is it possible to block you're own IP-adress? I'm pretty sure it is not possible at the moment, but is it hard to make? The script know the ip-adress anyway to count unique visistors, so why not block you own IP in the stats?

Thanks..

Alex.

Sorry for my english.

Posted: Mon Aug 25, 2008 6:49 pm
by Klemen
You can try changing line 64 in click.php from

Code: Select all

if ($settings['count_unique']==0 || $_COOKIE['ccount_unique']!=$id) {
to

Code: Select all

if ($settings['count_unique']==0 || $_COOKIE['ccount_unique']!=$id || $_SERVER['REMOTE_ADDR'] != '123.123.123.123') { 
and change 123.123.123.123 to your IP.