How can PHP be used to retrieve information about the parent DNS server of a domain?

To retrieve information about the parent DNS server of a domain in PHP, you can use the `dns_get_record()` function to query the NS (Name Server) records of the domain. This function returns an array of associative arrays containing DNS resource records. By filtering the results for NS records, you can extract the parent DNS server information.

$domain = 'example.com';
$ns_records = dns_get_record($domain, DNS_NS);

foreach($ns_records as $record) {
    echo 'Parent DNS Server: ' . $record['target'] . PHP_EOL;
}