dns_get_record

Supported Versions: PHP 5, PHP 7, PHP 8
Fetch DNS Resource Records associated with a hostname
dns_get_record(    string $hostname,    int $type DNS_ANY,    array &$authoritative_name_servers null,    array &$additional_records null,    bool $raw false): array|false
        if ($url parse_url($valuePHP_URL_HOST)) {

            try {

                return 
count(dns_get_record($url.'.'DNS_A DNS_AAAA)) > 0;

            } catch (
Exception $e) {

                return 
false;

            }