Check local ip

This commit is contained in:
RainLoop Team 2013-12-10 15:09:58 +04:00
parent fd22806e51
commit 54a522f7e4
2 changed files with 13 additions and 4 deletions

View file

@ -219,11 +219,18 @@ class Http
}
/**
* @param string $sValueToCheck = ''
*
* @return bool
*/
public function IsLocalhost()
public function IsLocalhost($sValueToCheck = '')
{
return $this->CheckLocalhost($this->GetServer('REMOTE_ADDR', ''));
if (empty($sValueToCheck))
{
$sValueToCheck = $this->GetServer('REMOTE_ADDR', '');
}
return $this->CheckLocalhost($sValueToCheck);
}
/**