PHP dns_check_record() Functie
Voorbeeld
Controleer DNS-records:
<?php
$domain="w3schools.com";
if(dns_check_record($domain,"MX")) {
echo
"Passed";
} else {
echo "Failed";
}
?>
Definitie en gebruik
De functie dns_check_record() is een alias van de functie checkdnsrr() .
Syntaxis
dns_check_record(host, type)
Parameterwaarden
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
Winstwaarde: | TRUE als er records worden gevonden, anders FALSE |
---|---|
PHP-versie: | 5.0+ |
❮ PHP-netwerkreferentie