public static function getHostForLookup($hostname, $blacklist, $isIP = true)
    {
        if ($isIP && filter_var($hostname, FILTER_VALIDATE_IP)) {
            return self::buildLookUpIP($hostname, $blacklist);
        }

        if ($isIP && !filter_var($hostname, FILTER_VALIDATE_IP)) {
            $resolver = new \Net_DNS_Resolver;
            $response = @$resolver->query($hostname);
            $ip = isset($response->answer[0]->address) ? $response->answer[0]->address : null;

            if (!$ip || !filter_var($ip, FILTER_VALIDATE_IP)) {
                return null;
            }

            return self::buildLookUpIP($ip, $blacklist);
        }

        return self::buildLookUpHost($hostname, $blacklist);
    }