Hi ppl!
I'm coding my statistics script.
Even if it will be very simple, i'm in doubt with some task ...
The core of the data picking are these 3 lines of code:
$browser = $HTTP_USER_AGENT;
$ip = $REMOTE_ADDR;
$visited_url = $PHP_SELF;
Datas will be stored in a db, and the script will be called at the top of each page (perhaps using auto_prepend_file in php.ini).
Now the questions:
1) if i'm behind a firewall, $ip will be the internal address of my ipchains box? If so, how can i get the correct remote ip?
2) $visited_url return the name of the script (www.foo.bar/index.php). How to have the entiere url (ie www.foo.bar/index.php?section=10)
Big Thanks!