retrieving this info via php?

A

Anonymous

Guest
how do I retrieve this info via php so I can put it into my stat system that I already have running, I would like to know where people are coming from, so the referring url is what I need, and is there other info that I can pull too that might be useful when talking about stats?

Godiwa
 
You've got a couple of prdefined vars -->

Code:
$browser = $_SERVER['HTTP_USER_AGENT']; 
$language = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
 
thanks :)

is there any predefined that say the url they came from to get into my site?

Godiwa
 
Yes :)
Code:
$_SERVER ["HTTP_REFERER"]

A good exercise to do is the following -->

Code:
<?php
echo "<pre>";
print_r ($_SERVER);
echo "</pre>";
?>

Any time you need to use predefined variables such $_SERVER, $_ENV, $_COOKIE, $_GET, etc... just do that and you will see what you've got.

Bye!
 
Back
Top