web forms proxy servers |
graziano 11-23-2004, 12:49 PM Hello
is there a good and efficient way to check if a visitor is behind a proxy servers using js ? Some time ago I have seen a javascript which
was able to show on browser the real ip of the visitor.
How to do ?
I am using php code below but it's not good using https .
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$proxy3="\nHTTP_X_FORWARDED_FOR DETECTED : the user should be behind a proxy server";
}
else
{
$proxy3="";
}
if (isset($_SERVER['HTTP_PROXY_CONNECTION']))
{
$proxy4="\nHTTP_PROXY_CONNECTION DETECTED : the user should be behind a proxy server";
}
else
{
$proxy4="";
}
if (isset($_SERVER['HTTP_VIA'])) {
$proxy5="\nHTTP_VIA DETECTED : the user should be behind a proxy server";
}
else
{
$proxy5="";
}
if (isset($_SERVER['HTTP_PRAGMA'])) {
$pragma=isset($_SERVER['HTTP_PRAGMA']);
$proxy6="\nHTTP_PRAGMA : (pragma=$pragma) the user should be behind a proxy server";
}
else
{
$proxy6="";
}
if (getenv(HTTP_X_FORWARDED_FOR)){
$ip=getenv(HTTP_X_FORWARDED_FOR);
$proxy= "\nHTTP_X_FORWARDED_FOR DETECTED the user should be behind a proxy server";
|
|
|
|
|