Validates an IP address.
string $requestIp:
string $ip:
boolean True valid, false if not.
protected function checkIp($requestIp, $ip) {
// IPv6 address
if (false !== strpos($requestIp, ':')) {
return $this
->checkIp6($requestIp, $ip);
}
else {
return $this
->checkIp4($requestIp, $ip);
}
}