dns_get_record

Supported Versions: PHP 5, PHP 7, PHP 8
Fetch DNS Resource Records associated with a hostname
<?php dns_get_record(    string $hostname,    int $type = DNS_ANY,    array &$authoritative_name_servers = null,    array &$additional_records = null,    bool $raw = false): array|false
<?php     protected function getDnsRecords($hostname, $type)

    {

        return dns_get_record($hostname, $type);

    }