Willkommen Gast. Bitte Einloggen oder Registrieren
 
Sprache wählen:
 
  Last Script Version: 20

  ÜbersichtHilfeSuchenEinloggenRegistrieren  
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken
Feature request: Use of domain names to exclude (Gelesen: 1504 mal)
John Motyer
Junior Member
**
Offline



Beiträge: 62
Burlington (Toronto), Canada
Geschlecht: male
Feature request: Use of domain names to exclude
22.05.22 um 02:55:32
 
Hello Reimar & Holger,

I don't know how easy or difficult it would be to add this capability in a future release, but where now under Advanced | General, where currently users can Exclude IP Addresses, it would be nice to be able to also add domain names.

Please let me explain why.  I am currently running phpWebStat on each of my 16 hobby websites, and I currently have my external IP added to be excluded from logging.  The problem is my external IP from my ISP occasionally gets reset to a new IP without me knowing about the new IP, often for many weeks, and during that time my own access to my sites end up being logged.  I know that I can set the cookie for each site that phpWebStat is running on to not log my own visits, but often I need to reset such things as my browser cache & sometimes cookies, requiring me to remember to enable the cookies for each site to not log my own visits again.

I use a DDNS (No-IP) to monitor my external IP changes, so my 16 domain names always point to my external IP even after it changes.  With the capability to use domain names to be excluded, my external IP can change to a new IP address without me having to worry about updating phpWebStat on each of my sites Smiley.

Just a thought.

Thank you in advance & have yourself a great day.

Regards,
John
Zum Seitenanfang
 

My phpWebStats:
| AuroraWings | FusionWings | GalleryWings | GenealogyWings | +7 more
Homepage  
IP gespeichert
 
Reimar
Administrator
*****
Offline



Beiträge: 1988
Geschlecht: male
Re: Feature request: Use of domain names to exclude
Antwort #1 - 24.05.22 um 10:01:05
 
Hi John,

we think we have a nice solution for you.
If you want to exclude your own visits from getting tracked, we place a little php-file on the desired domain, that is setting a coookie and forwards you to the homepage again. So, if you place the following code within a single file, e.g. "my-cookie.php" and bookmark this file (www.example.com/my-cookie.php), you can safely visit your page without getting tracked.

Here is the code:

Code (PHP):
<?php
//------------------------------------------------------------------------------
if ( ( !isset ( $_COOKIE ['dontcount'] ) ) || ( $_COOKIE ['dontcount'] != 'ja' ) )
 {
  setcookie ( 'dontcount', 'ja', time()+3600*24*365*5 , '/' );
  header    ( 'Location: /.' );
 }
else
 {
  header    ( 'Location: /.' );
 }
//------------------------------------------------------------------------------
?>
 



You can adjust the last line (header) with a page you want to forward to. If you want to read the manual regarding this function, just google "php header location".

Best wishes
Reimar
Zum Seitenanfang
 
 
IP gespeichert
 
John Motyer
Junior Member
**
Offline



Beiträge: 62
Burlington (Toronto), Canada
Geschlecht: male
Re: Feature request: Use of domain names to exclude
Antwort #2 - 24.05.22 um 10:02:54
 
Much appreciated for the suggestion, I'll give it a try.
Zum Seitenanfang
 

My phpWebStats:
| AuroraWings | FusionWings | GalleryWings | GenealogyWings | +7 more
Homepage  
IP gespeichert
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken