Block my own IP in stats

Post your Click counter digestion problems here
Post Reply
the_julle
Posts: 2
Joined: Mon Aug 25, 2008 9:56 am

Block my own IP in stats

Post 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.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post 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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply