')) {
if (!(filter_var($ip_or_domain, FILTER_VALIDATE_IP) || filter_var($ip_or_domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME))) $invalid_domain = true; // phpcs:ignore PHPCompatibility.Constants.NewConstants.filter_validate_domainFound -- This code only runs on php 7.0+ so ignore the warning
}
if ($invalid_domain) {
$AIOWPSecurity_Tools_Menu->show_msg_error(__('Please enter a valid IP address or domain name to look up.', 'all-in-one-wp-security-and-firewall'));
_e('Nothing to show.', 'all-in-one-wp-security-and-firewall');
} else {
$result = $AIOWPSecurity_Tools_Menu->whois_lookup($ip_or_domain);
if (is_wp_error($result)) {
$AIOWPSecurity_Tools_Menu->show_msg_error(htmlspecialchars($result->get_error_message()));
_e('Nothing to show.', 'all-in-one-wp-security-and-firewall');
} else {
echo htmlspecialchars($result);
}
}
?>