...

View Full Version : finding user latency



Just-
01-26-2007, 07:04 PM
hi guys
so i found out the code to get users ip and resolve the ip to a dns also

now does some one have a script to find out user latency?
anyone

latency or rtt

-----------
to get some one Ip address
and resolve the dns name i use this


if (getenv('HTTP_CLIENT_IP')) {
$IP = getenv('HTTP_CLIENT_IP');
}
elseif (getenv('HTTP_X_FORWARDED_FOR')) {
$IP = getenv('HTTP_X_FORWARDED_FOR');
}
elseif (getenv('HTTP_X_FORWARDED')) {
$IP = getenv('HTTP_X_FORWARDED');
}
elseif (getenv('HTTP_FORWARDED_FOR')) {
$IP = getenv('HTTP_FORWARDED_FOR');
}
elseif (getenv('HTTP_FORWARDED')) {
$IP = getenv('HTTP_FORWARDED');
}
else {
$IP = $_SERVER['REMOTE_ADDR'];
}

$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);

echo $_SERVER['REMOTE_ADDR'];

echo $hostname;


echo $IP;

lavinpj1
01-28-2007, 03:12 AM
You could theoretically ping them and get the response time however many people have incoming ICMP trafic disabled.

~Phil~

Just-
01-28-2007, 03:39 PM
do you have a code to ping them and get the time back
response ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum