Added to base model
This commit is contained in:
@@ -102,22 +102,6 @@ class userAccess extends baseModel
|
||||
return $tk;
|
||||
}
|
||||
|
||||
private function getIPAddress_old()
|
||||
{
|
||||
//whether ip is from the share internet
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
|
||||
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
||||
}
|
||||
//whether ip is from the proxy
|
||||
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
}
|
||||
//whether ip is from the remote address
|
||||
else {
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
return $ip;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user