Answers
可以。服务器解析目标域名(
www.blog.com
)会得到 CNAME 到
www.xx.com
的结果。
<?php
var_dump(dns_get_record('www.baidu.com', DNS_A));
// returns
array(2) {
[0]=>
array(5) {
["host"]=>
string(16) "www.a.shifen.com"
["class"]=>
string(2) "IN"
["ttl"]=>
int(267)
["type"]=>
string(1) "A"
["ip"]=>
string(14) "61.135.169.105"
}
[1]=>
array(5) {
["host"]=>
string(16) "www.a.shifen.com"
["class"]=>
string(2) "IN"
["ttl"]=>
int(267)
["type"]=>
string(1) "A"
["ip"]=>
string(14) "61.135.169.125"
}
}
hlnana
answered 10 years, 4 months ago