PHP checkdnsrr() Funksie
Voorbeeld
Gaan DNS-rekords na:
<?php
$domain="w3schools.com";
if(checkdnsrr($domain,"MX")) {
echo
"Passed";
} else {
echo "Failed";
}
?>
Definisie en gebruik
Die checkdnsrr()-funksie kontroleer DNS-rekords vir tipe wat ooreenstem met host .
Ons kan die checkdnsrr()-funksie gebruik om ons DNS-rekord na te gaan om die bestaan van 'n domeinnaam te verifieer of nie.
Sintaksis
checkdnsrr(host, type)
Parameterwaardes
Parameter | Description |
---|---|
host | Required. Specifies an IP address or host name to check |
type | Optional. Specifies the type. Can be one of the following:
|
Tegniese besonderhede
Terugkeerwaarde: | WAAR indien enige rekords gevind word, anders ONWAAR |
---|---|
PHP weergawe: | 4,0+ |
PHP Changelog: | PHP 5.3: Nou beskikbaar op Windows-platforms PHP 5.2.4: Die TXT-waarde van tipe bygevoeg |
❮ PHP-netwerkverwysing