PHP查询域名是否可注册,判断DNS是否存在
比较简单的判断方式,直接查询域名是否存在dns……
if(IS_POST){
$sld=I('sld');
$tld=I('tld');
$domain=$sld.$tld;
$response = @dns_get_record($domain, DNS_ALL);
if(empty($response)){
echo "<H2 style='color:green;' >Domain $name_domain is available.</H2>";
}else{
echo "<H2 style='color:red;'>Domain $name_domain has taken.</H2>";
}
}