Afficher la liste déroulante

dns_get_record()

« dns_get_mx | doubleval »
<?php
$array 
dns_get_record (
    
// string $hostname
    
?// [int $type = DNS_ANY]
    
// [array &$authns]
    
// [array &$addtl]
    
  // [bool &$raw = false]
);
?>
Résultat
$array = [
  
=> [
    
'host' => 'php.net',
    
'class' => 'IN',
    
'ttl' => 300,
    
'type' => 'NS',
    
'target' => 'dns3.easydns.org',
  ],
  
=> [
    
'host' => 'php.net',
    
'class' => 'IN',
    
'ttl' => 300,
    
'type' => 'NS',
    
'target' => 'dns1.easydns.com',
  ],
  
=> [
    
'host' => 'php.net',
    
'class' => 'IN',
    
'ttl' => 300,
    
'type' => 'NS',
    
'target' => 'dns4.easydns.info',
  ],
  
=> [
    
'host' => 'php.net',
    
'class' => 'IN',
    
'ttl' => 300,
    
'type' => 'NS',
    
'target' => 'dns2.easydns.net',
  ],
  
=> [
    
'host' => 'php.net',
    
'class' => 'IN',
    
'ttl' => 300,
    
'type' => 'SOA',
    
'mname' => 'ns1.php.net',
    
'rname' => 'admin.easydns.com',
    
'serial' => 1711620062,
    
'refresh' => 16384,
    
'retry' => 2048,
    
'expire' => 1048576,
    
'minimum-ttl' => 2560,
  ],
  
=> [
    
'host' => 'php.net',
    
'class' => 'IN',
    
'ttl' => 30,
    
'type' => 'MX',
    
'pri' => 0,
    
'target' => 'php-smtp4-ip4.php.net',
  ],
  
=> [
    
'host' => 'php.net',
    
'class' => 'IN',
    
'ttl' => 300,
    
'type' => 'TXT',
    
'txt' => 'google-site-verification=R0anXzbL507wmRx5iv1S-5jN55RYVo2UYIqFP2L_k1g',
    
'entries' => [
      
=> 'google-site-verification=R0anXzbL507wmRx5iv1S-5jN55RYVo2UYIqFP2L_k1g',
    ],
  ],
  
=> [
    
'host' => 'php.net',
    
'class' => 'IN',
    
'ttl' => 300,
    
'type' => 'TXT',
    
'txt' => '_globalsign-domain-verification=YKIbqgUIt0x2vDkmdYS8TzqfqP6jyVp2fVVyJWyopw',
    
'entries' => [
      
=> '_globalsign-domain-verification=YKIbqgUIt0x2vDkmdYS8TzqfqP6jyVp2fVVyJWyopw',
    ],
  ],
  
=> [
    
'host' => 'php.net',
    
'class' => 'IN',
    
'ttl' => 300,
    
'type' => 'TXT',
    
'txt' => 'v=spf1 ip4:140.211.15.143 ip4:45.112.84.5 ip4:142.93.197.176 ip6:2604:a880:400:d0::1c74:1001 ip6:2a02:cb43:8000::1102 ip4:157.90.121.187 ip6:2a01:4f8:1c1e:416d::1 ~all',
    
'entries' => [
      
=> 'v=spf1 ip4:140.211.15.143 ip4:45.112.84.5 ip4:142.93.197.176 ip6:2604:a880:400:d0::1c74:1001 ip6:2a02:cb43:8000::1102 ip4:157.90.121.187 ip6:2a01:4f8:1c1e:416d::1 ~all',
    ],
  ],
  
=> [
    
'host' => 'php.net',
    
'class' => 'IN',
    
'ttl' => 300,
    
'type' => 'TXT',
    
'txt' => 'google-site-verification=kEZx29YwmdFCUifeR9miIOp-x_gvEpo_T_o9UzbilLA',
    
'entries' => [
      
=> 'google-site-verification=kEZx29YwmdFCUifeR9miIOp-x_gvEpo_T_o9UzbilLA',
    ],
  ],
  
10 => [
    
'host' => 'php.net',
    
'class' => 'IN',
    
'ttl' => 300,
    
'type' => 'A',
    
'ip' => '185.85.0.29',
  ],
  
11 => [
    
'host' => 'php.net',
    
'class' => 'IN',
    
'ttl' => 300,
    
'type' => 'AAAA',
    
'ipv6' => '2a02:cb40:200::1ad',
  ],
]
Exemples
#1 dns_get_record  ("php.net")
Voir aussi
dns_check_record, dns_get_mx