private function getHost($ipStr)
    {
        $ip = IP::fromStringIP($ipStr);

        $host = $ip->getHostname();
        $host = ($host === null ? $ipStr : $host);

        return trim(strtolower($host));
    }
private function getHost($ipStr)
    {
        $ip = IP::fromStringIP($ipStr);

        $host = $ip->getHostname();
        $host = ($host === null ? $ipStr : $host);

        return trim(strtolower($host));
    }
private function getHost ( $ ipStr ) { $ ip = IP :: fromStringIP ( $ ipStr ) ; $ host = $ ip -> getHostname ( ) ; $ host = ( $ host === null ? $ ipStr : $ host ) ; return trim ( strtolower ( $ host ) ) ; }
Returns the hostname given the IP address string

@param string $ipStr IP Address
@return string hostname (or human-readable IP address)
Returns the hostname given the IP address string