PHP - Funktion dns_check_record()
Beispiel
DNS-Einträge prüfen:
<?php
$domain="w3schools.com";
if(dns_check_record($domain,"MX")) {
echo
"Passed";
} else {
echo "Failed";
}
?>
Definition und Verwendung
Die Funktion dns_check_record() ist ein Alias der Funktion checkdnsrr() .
Syntax
dns_check_record(host, type)
Parameterwerte
Parameter | Description |
---|---|
host | Required. Specifies an IP address or host name to check |
type | Optional. Specifies the type. Can be one of the following:
|
Technische Details
Rückgabewert: | TRUE, wenn Datensätze gefunden werden, andernfalls FALSE |
---|---|
PHP-Version: | 5.0+ |
❮ PHP-Netzwerkreferenz