Hello again,
I have a page visit tracker script created after a video tutorial on writing
your own tracker.
<?PHP
// consider dbconnection already in place
$page = $_SERVER["PHP_SELF"];
$IP = $_SERVER["REMOTE_ADDR"];
$date_auto = time ();
$query = "INSERT INTO tracker (page, IP, date_auto ) VALUES ('$page', '$IP',
'$date_auto')";
mysql_query ($query, $db_connection);
mysql_close ($db_connection);
?>
In the pages I want to track according to the tut all I have to do is add
<?php include ('http://wwwmyserver.com/tracker.php'); ?>
So I did. The weird bit is: in the tutorial the db lists the calling page's
name as PHP_SELF, but in my version it always shows the name of the
tracker.php script itself. I know I can use http_referer to get the info
about the page anyway, but can anyone explain WHY these results differ ? My
script is basically an identical copy of the tutorial script...
TIA,
Pjotr