Proxy detection

Proxy detection

am 14.09.2007 06:44:53 von howa

Not a perfect solution, but work for most (or some) proxy...

function fromProxy() {
if (
isset($_SERVER['HTTP_FORWARDED']) ||
isset($_SERVER['HTTP_X_FORWARDED_FOR']) ||
isset($_SERVER['HTTP_CLIENT_IP']) ||
isset($_SERVER['HTTP_VIA']) ||
isset($_SERVER['HTTP_XROXY_CONNECTION']) ||
isset($_SERVER['HTTP_PROXY_CONNECTION']) ||
isset($_SERVER['HTTP_MAX_FORWARDS'])
)
{
return true;
} else {
return false;
}
}