It seems that this forum will be my new home for a few days... but that's okay, ya'll seem like a nice enough group of people.
I want to write a short php script to act as a rudimentary stats gatherer. I'm thinking along the lines of writing one script, then including it in all the other pages. In other words, say I have index.shtml, about.shtml, and contact.php. I would like one script, stats.php, that I can use on the different pages (either by <!--#include file="php/stats.php"--> or include ("php/stats.php"); depending on how the page is parsed).
It'll just dump all the data in the same file, something along the lines of:
1. index.shtml 184.108.40.2069 refr: yahoo.com Mozilla /4.0
2. contact.php 220.127.116.119 refr: index.shtml Mozilla /4.0
3. index.shtml 918.104.22.168 refr: google.com Opera 6.0
4. index.shtml 22.214.171.1249 refr: contact.php Mozilla /4.0
5. about.shtml 9126.96.36.199 refr: index.shtml Opera 6.0
But to do that I'll need the page name into which the the script was included. I can't just use $PHP_SELF because it'll just return the name of the script, not the page (I even checked to see if there was a $HTTP_SELF... no luck).
What variable am I looking for to find the name of the page in which stats.php has been inserted?!