Page 1 of 1

annoying little tracker include problem?

Posted: Sat May 10, 2003 7:36 pm
by lc
Ok here's the situation.

On a site I designed I pasted a tracker bit from this place: http://www.extreme-dm.com/tracking/ it's a simple little tracker that does the job.

But since of course my sites are dynamic, and this thing tracks everything, at times it displays pages that not everyone should see in the referrer tracking list.

Ok so I made it so that the tracker only gets loaded when no one is logged in.

if ("$no one" == "logged in"){ include("tracker.html"); }

sort of like... you get it?

But still those pages are displayed in their referrer tracking list??? why??

I haven't a clue... mailed them about it, but thought that I am prolly overlooking something simple, so I'm asking you lovely people ;)

thx
lc

Posted: Sun May 11, 2003 10:55 am
by phice
If you could include a small portion of your coding so that we could see if there is some type of error, that'd be great. :)

Posted: Sun May 11, 2003 12:53 pm
by lc
Well... there's no error in my coding... the tracker is simply not included when it shouldn't be. It does not load tracker.html when it shouldn't. The way I see it... when you don't load a tracker, they can't track you...

But then when you do an if statement with an include in it and there's a php error in the included bit.. php does show an error... does that mean that the script is run? even if it's straight html inside a non valid include and doesn't get added to your page???

Thing is.. I can fix it ok by changing the login method to the new one I use on all the sites I make now... but this should work... I'm baffled.

Posted: Sun May 11, 2003 12:56 pm
by m3mn0n
setcookie()

Code: Select all

<?php
$_COOKIE['variable']
?>

Posted: Sun May 11, 2003 12:57 pm
by lc
ehm what I meant is...

is it possible the tracker is trigerred by php.exe even when it's not included in the page, but just because it's run through php because it's mentioned????

and setcookie???? why??? I do not see the relevance.

Posted: Sun May 11, 2003 1:06 pm
by m3mn0n

Code: Select all

<?php
// to make sure a user isn't logged in
setcookie("loggedin", "");
?>

Code: Select all

<?php
if($_COOKIE['loggedin'] == ""){
  // show tracker.html
} elseif($_COOKIE['loggedin'] == "loggedin") {
 // logged in
} else {
 // echo an &nbsp; or something
}
?>

Posted: Sun May 11, 2003 1:10 pm
by m3mn0n
sorry if i misunderstood the problem. :?

Posted: Sun May 11, 2003 2:28 pm
by lc
yup you misunderstood.... I am not looking for a better login script... the one I have on there works fine, and if all else fails I ahve a better one lying around.

I just don't want to implement it yet... would mean a rather extensive rewrite. And more importantly.. I want to udnerstand the issue with the tracker.

I mean, how can it track a link when it isn't included in the actual php output page?