dns_get_record — Fetch DNS Resource Records associated with a hostname
Trang 1 trong tổng số 1 trang
dns_get_record — Fetch DNS Resource Records associated with a hostname
- Code:
<?php
// Nguồn tham khảo: - http://www.aweb.com.vn/xem-thiet-ke-web/43.Kiem-tra-ten-mien-Viet-Nam-va-quoc-te-voi-ham-dns_get_record.html
// - http://php.net/manual/en/function.dns-get-record.php
$domain = "timviec.com";
$whois = dns_get_record($domain);
if(count($whois) > 1) // <= nếu mảng $whois lớn hơn 1 thì tên miền đã được đăng ký.
{
echo "<td><font color=red><a href='./?domain=$domain'>Đã đăng ký</a></font></td>";
}
else // <= Ngược lại thì chưa được đăng ký.
{
echo "<td><font color=blue> Chưa đăng ký</font></td>";
}
$result = dns_get_record("php.net");
print_r($result);
?>
Trang 1 trong tổng số 1 trang
Permissions in this forum:
Bạn không có quyền trả lời bài viết
|
|