Hi
I want to be able to read a computers IP address even when it has gone through a router. I have an external website and want to know specifically which PC's on a network have accessed pages. I heard you could do this with headers but the headers dont seem to pick this information up.
I am using this code to read the headers:
$headers = array();
foreach($_SERVER as $k => $v)
{
if(substr($k, 0, 5) == "HTTP_")
{
$k = str_replace("_", " ", substr($k, 5));
$k = str_replace(" ", "-", ucwords(strtolower($k)));
$headers[$k] = $v;
}
}
print_r($headers);
Any help is appreciated
I want to be able to read a computers IP address even when it has gone through a router. I have an external website and want to know specifically which PC's on a network have accessed pages. I heard you could do this with headers but the headers dont seem to pick this information up.
I am using this code to read the headers:
$headers = array();
foreach($_SERVER as $k => $v)
{
if(substr($k, 0, 5) == "HTTP_")
{
$k = str_replace("_", " ", substr($k, 5));
$k = str_replace(" ", "-", ucwords(strtolower($k)));
$headers[$k] = $v;
}
}
print_r($headers);
Any help is appreciated