phpTrafficA user forum
 
phpTrafficA Homepage
 
Please ask your questions in English or French! Support in other languages may be slow.
Russian speaking users can find Russian discussions on phpTrafficA at ru-board.com
 
Operations:  Thread list Thread list  New thread New thread  Reply in this thread Reply in this thread
Search 
Advanced search
Thread "Logging admin problem" Started by Chuck on: 09/13/2005 3:28am
Current page: 1 of 1 Go to page: 1
Logging admin problem
Posted by: Chuck  on: 09/13/2005 3:28am
Your script is running great, I have a small problem, however. I'd like to exclude myself from logging. I tried to do that on the reminder page. It is set correctly: "The cookie `phpTrafficA` is set to `Admin`, you will not be counted in the statistics". Yet, all my hits are logged. Please give me a suggestion, how to resolve this tiny glitch.
Thank you.
Ad
Re: Logging admin problem
Posted by: ZoneO Support  on: 09/13/2005 7:57pm
This happens when the address you used to set the cookie is different from the one used to record statistics... Let me explain...

If phpTrafficA is installed on your local computer, and if you log in locally for administration, you log into
http://localhost/php/...

or whatever it is.

Now, for you actual website, phpTrafficA appears to be at
http://www.mywebsite.com/php/...


If you set the cookie from 'localhost', it will not work from 'www.mywebsite.com'. You have to log into phpTraffic directly on 'www.mywebsite.com'.

Is that clear?!
Re: Logging admin problem
Posted by: Chuck  on: 09/13/2005 11:54pm
Thats exactly how I'm doing it. The problem is more complex, I figured out what it is. Might be useful if you receive similar requests:
My server stores several domains separetely. I've setup phpTrafficA directly under the main domain's htdocs directory, and I'm accessing the admin page calling 'main_domain.com/phpTrafficA'. Other domains' htdocs directories are stored under the main htdocs dir, and accessed by their different individual domain names. When calling your scripts from stats.js on a secondary domain, and your setCookie.php file attempts to set the cookie under the main domain, IE browsers consider it a 3rd party cookie request, and by defult it does not allow that.
The only way to overcome this problem is to overwrite IE privacy policies by either allowing 3rd party cookie requests, or better adding individual domain names for acceptance.
Re: Logging admin problem
Posted by: ZoneO Support  on: 09/14/2005 3:44am
Another solution, load this file from every domain where you use phpTrafficA (save it as setCookie.php):
<?
SetCookie("phpTrafficA","Admin",time()+100000000,"/",&qu­ot;",0);
?>
<html>
<body>
<center>Cookie was set.</center>
</body>
</html>
I get you a coffee!
Posted by: Butchu  on: 05/26/2013 11:20am
Gee, I really liked this answer! I want to thank you and I buy you a coffee!
Current page: 1 of 1 Go to page: 1
Forum powered by FreeForum
© 2004-2010 ZoneO-soft
phpTrafficA homepage in: English - Français - Русский - Deutsch - Español - Nederlands - Romaneste - Svenska - Italiano
Also available at ZoneO: freeForum -- phpTrafficA -- Linux-tips -- Unixtime Online -- PageRank online
Page generation: 0.070 sec