开发者

Issues with dns_get_record

开发者 https://www.devze.com 2023-03-16 17:19 出处:网络
I am trying to configure a script to find out if a clients A Record has been setup yet. The problem is, I have already parked the A Record on my cPanel account.

I am trying to configure a script to find out if a clients A Record has been setup yet. The problem is, I have already parked the A Record on my cPanel account.

Therefore, when I use

$ip = dns_get_record(URL, DNS_A);

if ($ip[0]['ip'] == IPADDRESS) {
    echo '<div style="color:green; font-weight:bold;">DNS Correct</div>'; } else { 
    echo '<div style="color:red; font-weight:bold">DNS Config Error</div>'; }

or via gethostbyaddr() it will show that the A record is correctly setup and pointing to my server.. but its not. 开发者_运维知识库It is only pointing to my server because i have parked the A record in the DNS.

The script muse somehow first checks with the current servers DNS records before proceeding to the global registry?

Is there a way to check the remote DNS registry first?


You are going to want to first find the authoritative name server for the domain if not already known, then do a dig command on it and check the results for an answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消