dns_get_record() is not returning all of the records

514 Views Asked by At

I'm using PHP 7.2 in a virtual machine. Am using dns_get_record() function to get the DNS records but it is not returning all the records. When I'm using the same code on my local machine or any other online php code editor like 'phpfiddle.com', its returning desired output.

For example if I'm using dns_get_record('google.com', DNS_ANY) on my local server, it's returning 17 records but same code returns only 10 records on my VM.

Please help me with it. Am not even sure whether it is due to VM or some other reasons (may be any server config issue or something).

Have already tried dns_get_record() function with all possible combinations of parameters like DNS_ANY or '+' concatenated string of available constants like DNS_A + DNS_AAAA + DNS_PTR + DNS_CNAME + ... etc. but haven't met with desired output.

0

There are 0 best solutions below