{"version":"1.1","schema_version":"1.1.0","plugin_version":"1.1.2","url":"https://tutos-gameserver.fr/2019/10/19/php-get-dns-nameserver-cname-mx-a-records-dun-domaine-binarytides-bien-choisir-son-serveur-d-impression/","llm_html_url":"https://tutos-gameserver.fr/2019/10/19/php-get-dns-nameserver-cname-mx-a-records-dun-domaine-binarytides-bien-choisir-son-serveur-d-impression/llm","llm_json_url":"https://tutos-gameserver.fr/2019/10/19/php-get-dns-nameserver-cname-mx-a-records-dun-domaine-binarytides-bien-choisir-son-serveur-d-impression/llm.json","manifest_url":"https://tutos-gameserver.fr/llm-endpoints-manifest.json","language":"fr-FR","locale":"fr_FR","title":"PHP get DNS Nameserver, Cname, MX, A records d&#39;un domaine &#8211; BinaryTides\n\n &#8211; Bien choisir son serveur d impression","site":{"name":"Tutos GameServer","url":"https://tutos-gameserver.fr/"},"author":{"id":1,"name":"Titanfall","url":"https://tutos-gameserver.fr/author/titanfall/"},"published_at":"2019-10-19T14:54:24+00:00","modified_at":"2019-10-19T14:54:24+00:00","word_count":552,"reading_time_seconds":166,"summary":"PHP a une fonction utile appelée dns_get_record qui permet d’obtenir très facilement différents types d’enregistrements pour un domaine donné. Nameserver &#8211; NS Records: $ php -a Shell interactif php&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_NS)); Tableau ( [0] =&gt; Tableau         ( [host] =&gt; binarytides.com [type] =&gt; NS [target] =&gt; omikro1.allwebserver.com [class] =&gt; IN [ttl] =&gt; 86140         ) [&hellip;]","summary_points":["PHP a une fonction utile appelée dns_get_record qui permet d’obtenir très facilement différents types d’enregistrements pour un domaine donné.","Nameserver &#8211; NS Records:\n$ php -a\r\nShell interactif\r\n\r\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_NS));\r\nTableau\r\n(\r\n    [0] =&gt; Tableau\r\n        (\r\n            [host] =&gt; binarytides.com\r\n            [type] =&gt; NS\r\n            [target] =&gt; omikro1.allwebserver.com\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 86140\r\n        )\r\n\r\n    [1] =&gt; Tableau\r\n        (\r\n            [host] =&gt; binarytides.com\r\n            [type] =&gt; NS\r\n            [target] =&gt; omikro2.allwebserver.com\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 86140\r\n        )\r\n\r\n)\r\nphp&gt;\nUn enregistrement &#8211; adresse IP:\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_A));\r\nTableau\r\n(\r\n    [0] =&gt; Tableau\r\n        (\r\n            [host] =&gt; binarytides.com\r\n            [type] =&gt; A\r\n            [ip] =&gt; 64.131.72.23\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 14046\r\n        )\r\n\r\n)\r\nphp&gt;\nUne autre méthode simple pour obtenir l’enregistrement A ou l’adresse IP d’un nom de domaine consiste à utiliser la fonction gethostbyname:\nphp&gt; print_r (gethostbyname (&#39;www.binarytides.com&#39;));\r\n64.131.72.23\r\nphp&gt;\nUne autre méthode, gethostbynamel, donnerait un tableau d&#39;adresses IP:\nphp&gt; print_r (gethostbynamel (&#39;www.google.com&#39;));\r\nTableau\r\n(\r\n    [0] =&gt; 74.125.71.147\r\n    [1] =&gt; 74.125.71.99\r\n    [2] =&gt; 74.125.71.104\r\n    [3] =&gt; 74.125.71.106\r\n    [4] =&gt; 74.125.71.105\r\n    [5] =&gt; 74.125.71.103\r\n)\r\nphp&gt;\nEnregistrement MX &#8211; Serveur mail:\nLes enregistrements MX donnent le serveur de messagerie pour un domaine donné.","Ces serveurs de messagerie peuvent être utilisés pour envoyer des courriers à un certain courrier sur ce domaine, par exemple.","[email protected]\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_MX));\r\nTableau\r\n(\r\n    [0] =&gt; Tableau\r\n        (\r\n            [host] =&gt; binarytides.com\r\n            [type] =&gt; MX\r\n            [pri] =&gt; 0\r\n            [target] =&gt; binarytides.com\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 14400\r\n        )\r\n\r\n)\r\nphp&gt;\nPour les enregistrements MX, il existe une fonction alternative appelée getmxrr, qui peut être utilisée comme ceci:\nphp&gt; getmxrr (&#39;www.binarytides.com&#39;, $ mxhosts);\r\nphp&gt; print_r ($ mxhosts);\r\nTableau\r\n(\r\n    [0] =&gt; binarytides.com\r\n)\r\nphp&gt;\nIl retourne un tableau de mxhosts pour un nom d&#39;hôte / domaine donné."],"topics":["Serveur d'impression"],"entities":[],"entities_metadata":[{"id":10,"name":"Serveur d'impression","slug":"serveur-dimpression","taxonomy":"category","count":3907,"url":"https://tutos-gameserver.fr/category/serveur-dimpression/"}],"tags":["Serveur d'impression"],"content_hash":"c5b0d0bcd41d0ce1990b07779bda134d","plain_text":"PHP a une fonction utile appelée dns_get_record qui permet d’obtenir très facilement différents types d’enregistrements pour un domaine donné.\n\n\n\nNameserver &#8211; NS Records:\n$ php -a\r\nShell interactif\r\n\r\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_NS));\r\nTableau\r\n(\r\n    [0] =&gt; Tableau\r\n        (\r\n            [host] =&gt; binarytides.com\r\n            [type] =&gt; NS\r\n            [target] =&gt; omikro1.allwebserver.com\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 86140\r\n        )\r\n\r\n    [1] =&gt; Tableau\r\n        (\r\n            [host] =&gt; binarytides.com\r\n            [type] =&gt; NS\r\n            [target] =&gt; omikro2.allwebserver.com\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 86140\r\n        )\r\n\r\n)\r\nphp&gt;\nUn enregistrement &#8211; adresse IP:\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_A));\r\nTableau\r\n(\r\n    [0] =&gt; Tableau\r\n        (\r\n            [host] =&gt; binarytides.com\r\n            [type] =&gt; A\r\n            [ip] =&gt; 64.131.72.23\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 14046\r\n        )\r\n\r\n)\r\nphp&gt;\nUne autre méthode simple pour obtenir l’enregistrement A ou l’adresse IP d’un nom de domaine consiste à utiliser la fonction gethostbyname:\nphp&gt; print_r (gethostbyname (&#39;www.binarytides.com&#39;));\r\n64.131.72.23\r\nphp&gt;\nUne autre méthode, gethostbynamel, donnerait un tableau d&#39;adresses IP:\nphp&gt; print_r (gethostbynamel (&#39;www.google.com&#39;));\r\nTableau\r\n(\r\n    [0] =&gt; 74.125.71.147\r\n    [1] =&gt; 74.125.71.99\r\n    [2] =&gt; 74.125.71.104\r\n    [3] =&gt; 74.125.71.106\r\n    [4] =&gt; 74.125.71.105\r\n    [5] =&gt; 74.125.71.103\r\n)\r\nphp&gt;\nEnregistrement MX &#8211; Serveur mail:\nLes enregistrements MX donnent le serveur de messagerie pour un domaine donné. Ces serveurs de messagerie peuvent être utilisés pour envoyer des courriers à un certain courrier sur ce domaine, par exemple. [email protected]\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_MX));\r\nTableau\r\n(\r\n    [0] =&gt; Tableau\r\n        (\r\n            [host] =&gt; binarytides.com\r\n            [type] =&gt; MX\r\n            [pri] =&gt; 0\r\n            [target] =&gt; binarytides.com\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 14400\r\n        )\r\n\r\n)\r\nphp&gt;\nPour les enregistrements MX, il existe une fonction alternative appelée getmxrr, qui peut être utilisée comme ceci:\nphp&gt; getmxrr (&#39;www.binarytides.com&#39;, $ mxhosts);\r\nphp&gt; print_r ($ mxhosts);\r\nTableau\r\n(\r\n    [0] =&gt; binarytides.com\r\n)\r\nphp&gt;\nIl retourne un tableau de mxhosts pour un nom d&#39;hôte / domaine donné.\nCNAME Records &#8211; Alias ​​Canonical:\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_CNAME));\r\nTableau\r\n(\r\n    [0] =&gt; Tableau\r\n        (\r\n            [host] =&gt; www.binarytides.com\r\n            [type] =&gt; CNAME\r\n            [target] =&gt; binarytides.com\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 13932\r\n        )\r\n\r\n)\r\nphp&gt;\nAvec l&#39;option DNS_ALL, vous pouvez obtenir toutes les informations ci-dessus en même temps:\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_ALL));\r\nTableau\r\n(\r\n    [0] =&gt; Tableau\r\n        (\r\n            [host] =&gt; binarytides.com\r\n            [type] =&gt; A\r\n            [ip] =&gt; 64.131.72.23\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 14202\r\n        )\r\n\r\n    [1] =&gt; Tableau\r\n        (\r\n            [host] =&gt; binarytides.com\r\n            [type] =&gt; NS\r\n            [target] =&gt; omikro2.allwebserver.com\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 86344\r\n        )\r\n\r\n    [2] =&gt; Tableau\r\n        (\r\n            [host] =&gt; binarytides.com\r\n            [type] =&gt; NS\r\n            [target] =&gt; omikro1.allwebserver.com\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 86344\r\n        )\r\n\r\n    [3] =&gt; Tableau\r\n        (\r\n            [host] =&gt; www.binarytides.com\r\n            [type] =&gt; CNAME\r\n            [target] =&gt; binarytides.com\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 13800\r\n        )\r\n\r\n    [4] =&gt; Tableau\r\n        (\r\n            [host] =&gt; binarytides.com\r\n            [type] =&gt; SOA\r\n            [mname] =&gt; host1.allwebserver.com\r\n            [rname] =&gt; omikrosys.gmail.com\r\n            [serial] =&gt; 2011020202\r\n            [refresh] =&gt; 86400\r\n            [retry] =&gt; 7200\r\n            [expire] =&gt; 3600000\r\n            [minimum-ttl] =&gt; 86400\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 86344\r\n        )\r\n\r\n    [5] =&gt; Tableau\r\n        (\r\n            [host] =&gt; binarytides.com\r\n            [type] =&gt; MX\r\n            [pri] =&gt; 0\r\n            [target] =&gt; binarytides.com\r\n            [class] =&gt; IN\r\n            [ttl] =&gt; 14199\r\n        )\r\n\r\n)\r\nphp&gt;\nLes autres options disponibles sont:DNS_HINFO, DNS_PTR, DNS_SOA, DNS_TXT, DNS_AAAA, DNS_SRV, DNS_NAPTR, DNS_A6, DNS_ANY.\nRéférences :\n1. Manuel sur: http://php.net/manual/en/function.dns-get-record.php\nDernière mise à jour le: 27 mai 2013\n  \n\n\n\n\n\n\n\n\t\t\t\nClick to rate this post!\r\n                                   \r\n                               [Total: 0  Average: 0]","paragraphs":["PHP a une fonction utile appelée dns_get_record qui permet d’obtenir très facilement différents types d’enregistrements pour un domaine donné.","Nameserver &#8211; NS Records:\n$ php -a\nShell interactif","php&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_NS));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro1.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86140\n        )","[1] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro2.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86140\n        )",")\nphp&gt;\nUn enregistrement &#8211; adresse IP:\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_A));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; A\n            [ip] =&gt; 64.131.72.23\n            [class] =&gt; IN\n            [ttl] =&gt; 14046\n        )",")\nphp&gt;\nUne autre méthode simple pour obtenir l’enregistrement A ou l’adresse IP d’un nom de domaine consiste à utiliser la fonction gethostbyname:\nphp&gt; print_r (gethostbyname (&#39;www.binarytides.com&#39;));\n64.131.72.23\nphp&gt;\nUne autre méthode, gethostbynamel, donnerait un tableau d&#39;adresses IP:\nphp&gt; print_r (gethostbynamel (&#39;www.google.com&#39;));\nTableau\n(\n    [0] =&gt; 74.125.71.147\n    [1] =&gt; 74.125.71.99\n    [2] =&gt; 74.125.71.104\n    [3] =&gt; 74.125.71.106\n    [4] =&gt; 74.125.71.105\n    [5] =&gt; 74.125.71.103\n)\nphp&gt;\nEnregistrement MX &#8211; Serveur mail:\nLes enregistrements MX donnent le serveur de messagerie pour un domaine donné. Ces serveurs de messagerie peuvent être utilisés pour envoyer des courriers à un certain courrier sur ce domaine, par exemple. [email protected]\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_MX));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; MX\n            [pri] =&gt; 0\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 14400\n        )",")\nphp&gt;\nPour les enregistrements MX, il existe une fonction alternative appelée getmxrr, qui peut être utilisée comme ceci:\nphp&gt; getmxrr (&#39;www.binarytides.com&#39;, $ mxhosts);\nphp&gt; print_r ($ mxhosts);\nTableau\n(\n    [0] =&gt; binarytides.com\n)\nphp&gt;\nIl retourne un tableau de mxhosts pour un nom d&#39;hôte / domaine donné.\nCNAME Records &#8211; Alias ​​Canonical:\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_CNAME));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; www.binarytides.com\n            [type] =&gt; CNAME\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 13932\n        )",")\nphp&gt;\nAvec l&#39;option DNS_ALL, vous pouvez obtenir toutes les informations ci-dessus en même temps:\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_ALL));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; A\n            [ip] =&gt; 64.131.72.23\n            [class] =&gt; IN\n            [ttl] =&gt; 14202\n        )","[1] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro2.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86344\n        )","[2] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro1.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86344\n        )","[3] =&gt; Tableau\n        (\n            [host] =&gt; www.binarytides.com\n            [type] =&gt; CNAME\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 13800\n        )","[4] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; SOA\n            [mname] =&gt; host1.allwebserver.com\n            [rname] =&gt; omikrosys.gmail.com\n            [serial] =&gt; 2011020202\n            [refresh] =&gt; 86400\n            [retry] =&gt; 7200\n            [expire] =&gt; 3600000\n            [minimum-ttl] =&gt; 86400\n            [class] =&gt; IN\n            [ttl] =&gt; 86344\n        )","[5] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; MX\n            [pri] =&gt; 0\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 14199\n        )",")\nphp&gt;\nLes autres options disponibles sont:DNS_HINFO, DNS_PTR, DNS_SOA, DNS_TXT, DNS_AAAA, DNS_SRV, DNS_NAPTR, DNS_A6, DNS_ANY.\nRéférences :\n1. Manuel sur: http://php.net/manual/en/function.dns-get-record.php\nDernière mise à jour le: 27 mai 2013","Click to rate this post!\n                                   \n                               [Total: 0  Average: 0]"],"content_blocks":[{"id":"text-1","type":"text","heading":"","plain_text":"PHP a une fonction utile appelée dns_get_record qui permet d’obtenir très facilement différents types d’enregistrements pour un domaine donné.","html":"<p>PHP a une fonction utile appelée dns_get_record qui permet d’obtenir très facilement différents types d’enregistrements pour un domaine donné.</p>"},{"id":"text-2","type":"text","heading":"","plain_text":"Nameserver &#8211; NS Records:\n$ php -a\nShell interactif","html":"<p>Nameserver &#8211; NS Records:\n$ php -a\nShell interactif</p>"},{"id":"text-3","type":"text","heading":"","plain_text":"php&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_NS));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro1.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86140\n        )","html":"<p>php&gt; print_r (dns_get_record (&#039;www.binarytides.com&#039;, DNS_NS));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro1.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86140\n        )</p>"},{"id":"text-4","type":"text","heading":"","plain_text":"[1] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro2.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86140\n        )","html":"<p>[1] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro2.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86140\n        )</p>"},{"id":"text-5","type":"text","heading":"","plain_text":")\nphp&gt;\nUn enregistrement &#8211; adresse IP:\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_A));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; A\n            [ip] =&gt; 64.131.72.23\n            [class] =&gt; IN\n            [ttl] =&gt; 14046\n        )","html":"<p>)\nphp&gt;\nUn enregistrement &#8211; adresse IP:\nphp&gt; print_r (dns_get_record (&#039;www.binarytides.com&#039;, DNS_A));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; A\n            [ip] =&gt; 64.131.72.23\n            [class] =&gt; IN\n            [ttl] =&gt; 14046\n        )</p>"},{"id":"text-6","type":"text","heading":"","plain_text":")\nphp&gt;\nUne autre méthode simple pour obtenir l’enregistrement A ou l’adresse IP d’un nom de domaine consiste à utiliser la fonction gethostbyname:\nphp&gt; print_r (gethostbyname (&#39;www.binarytides.com&#39;));\n64.131.72.23\nphp&gt;\nUne autre méthode, gethostbynamel, donnerait un tableau d&#39;adresses IP:\nphp&gt; print_r (gethostbynamel (&#39;www.google.com&#39;));\nTableau\n(\n    [0] =&gt; 74.125.71.147\n    [1] =&gt; 74.125.71.99\n    [2] =&gt; 74.125.71.104\n    [3] =&gt; 74.125.71.106\n    [4] =&gt; 74.125.71.105\n    [5] =&gt; 74.125.71.103\n)\nphp&gt;\nEnregistrement MX &#8211; Serveur mail:\nLes enregistrements MX donnent le serveur de messagerie pour un domaine donné. Ces serveurs de messagerie peuvent être utilisés pour envoyer des courriers à un certain courrier sur ce domaine, par exemple. [email protected]\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_MX));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; MX\n            [pri] =&gt; 0\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 14400\n        )","html":"<p>)\nphp&gt;\nUne autre méthode simple pour obtenir l’enregistrement A ou l’adresse IP d’un nom de domaine consiste à utiliser la fonction gethostbyname:\nphp&gt; print_r (gethostbyname (&#039;www.binarytides.com&#039;));\n64.131.72.23\nphp&gt;\nUne autre méthode, gethostbynamel, donnerait un tableau d&#039;adresses IP:\nphp&gt; print_r (gethostbynamel (&#039;www.google.com&#039;));\nTableau\n(\n    [0] =&gt; 74.125.71.147\n    [1] =&gt; 74.125.71.99\n    [2] =&gt; 74.125.71.104\n    [3] =&gt; 74.125.71.106\n    [4] =&gt; 74.125.71.105\n    [5] =&gt; 74.125.71.103\n)\nphp&gt;\nEnregistrement MX &#8211; Serveur mail:\nLes enregistrements MX donnent le serveur de messagerie pour un domaine donné. Ces serveurs de messagerie peuvent être utilisés pour envoyer des courriers à un certain courrier sur ce domaine, par exemple. [email protected]\nphp&gt; print_r (dns_get_record (&#039;www.binarytides.com&#039;, DNS_MX));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; MX\n            [pri] =&gt; 0\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 14400\n        )</p>"},{"id":"text-7","type":"text","heading":"","plain_text":")\nphp&gt;\nPour les enregistrements MX, il existe une fonction alternative appelée getmxrr, qui peut être utilisée comme ceci:\nphp&gt; getmxrr (&#39;www.binarytides.com&#39;, $ mxhosts);\nphp&gt; print_r ($ mxhosts);\nTableau\n(\n    [0] =&gt; binarytides.com\n)\nphp&gt;\nIl retourne un tableau de mxhosts pour un nom d&#39;hôte / domaine donné.\nCNAME Records &#8211; Alias ​​Canonical:\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_CNAME));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; www.binarytides.com\n            [type] =&gt; CNAME\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 13932\n        )","html":"<p>)\nphp&gt;\nPour les enregistrements MX, il existe une fonction alternative appelée getmxrr, qui peut être utilisée comme ceci:\nphp&gt; getmxrr (&#039;www.binarytides.com&#039;, $ mxhosts);\nphp&gt; print_r ($ mxhosts);\nTableau\n(\n    [0] =&gt; binarytides.com\n)\nphp&gt;\nIl retourne un tableau de mxhosts pour un nom d&#039;hôte / domaine donné.\nCNAME Records &#8211; Alias ​​Canonical:\nphp&gt; print_r (dns_get_record (&#039;www.binarytides.com&#039;, DNS_CNAME));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; www.binarytides.com\n            [type] =&gt; CNAME\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 13932\n        )</p>"},{"id":"text-8","type":"text","heading":"","plain_text":")\nphp&gt;\nAvec l&#39;option DNS_ALL, vous pouvez obtenir toutes les informations ci-dessus en même temps:\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_ALL));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; A\n            [ip] =&gt; 64.131.72.23\n            [class] =&gt; IN\n            [ttl] =&gt; 14202\n        )","html":"<p>)\nphp&gt;\nAvec l&#039;option DNS_ALL, vous pouvez obtenir toutes les informations ci-dessus en même temps:\nphp&gt; print_r (dns_get_record (&#039;www.binarytides.com&#039;, DNS_ALL));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; A\n            [ip] =&gt; 64.131.72.23\n            [class] =&gt; IN\n            [ttl] =&gt; 14202\n        )</p>"},{"id":"text-9","type":"text","heading":"","plain_text":"[1] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro2.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86344\n        )","html":"<p>[1] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro2.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86344\n        )</p>"},{"id":"text-10","type":"text","heading":"","plain_text":"[2] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro1.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86344\n        )","html":"<p>[2] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro1.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86344\n        )</p>"},{"id":"text-11","type":"text","heading":"","plain_text":"[3] =&gt; Tableau\n        (\n            [host] =&gt; www.binarytides.com\n            [type] =&gt; CNAME\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 13800\n        )","html":"<p>[3] =&gt; Tableau\n        (\n            [host] =&gt; www.binarytides.com\n            [type] =&gt; CNAME\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 13800\n        )</p>"},{"id":"text-12","type":"text","heading":"","plain_text":"[4] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; SOA\n            [mname] =&gt; host1.allwebserver.com\n            [rname] =&gt; omikrosys.gmail.com\n            [serial] =&gt; 2011020202\n            [refresh] =&gt; 86400\n            [retry] =&gt; 7200\n            [expire] =&gt; 3600000\n            [minimum-ttl] =&gt; 86400\n            [class] =&gt; IN\n            [ttl] =&gt; 86344\n        )","html":"<p>[4] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; SOA\n            [mname] =&gt; host1.allwebserver.com\n            [rname] =&gt; omikrosys.gmail.com\n            [serial] =&gt; 2011020202\n            [refresh] =&gt; 86400\n            [retry] =&gt; 7200\n            [expire] =&gt; 3600000\n            [minimum-ttl] =&gt; 86400\n            [class] =&gt; IN\n            [ttl] =&gt; 86344\n        )</p>"},{"id":"text-13","type":"text","heading":"","plain_text":"[5] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; MX\n            [pri] =&gt; 0\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 14199\n        )","html":"<p>[5] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; MX\n            [pri] =&gt; 0\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 14199\n        )</p>"},{"id":"text-14","type":"text","heading":"","plain_text":")\nphp&gt;\nLes autres options disponibles sont:DNS_HINFO, DNS_PTR, DNS_SOA, DNS_TXT, DNS_AAAA, DNS_SRV, DNS_NAPTR, DNS_A6, DNS_ANY.\nRéférences :\n1. Manuel sur: http://php.net/manual/en/function.dns-get-record.php\nDernière mise à jour le: 27 mai 2013","html":"<p>)\nphp&gt;\nLes autres options disponibles sont:DNS_HINFO, DNS_PTR, DNS_SOA, DNS_TXT, DNS_AAAA, DNS_SRV, DNS_NAPTR, DNS_A6, DNS_ANY.\nRéférences :\n1. Manuel sur: http://php.net/manual/en/function.dns-get-record.php\nDernière mise à jour le: 27 mai 2013</p>"},{"id":"text-15","type":"text","heading":"","plain_text":"Click to rate this post!\n                                   \n                               [Total: 0  Average: 0]","html":"<p>Click to rate this post!\n                                   \n                               [Total: 0  Average: 0]</p>"}],"sections":[{"id":"text-1","heading":"Text","content":"PHP a une fonction utile appelée dns_get_record qui permet d’obtenir très facilement différents types d’enregistrements pour un domaine donné."},{"id":"text-2","heading":"Text","content":"Nameserver &#8211; NS Records:\n$ php -a\nShell interactif"},{"id":"text-3","heading":"Text","content":"php&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_NS));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro1.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86140\n        )"},{"id":"text-4","heading":"Text","content":"[1] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro2.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86140\n        )"},{"id":"text-5","heading":"Text","content":")\nphp&gt;\nUn enregistrement &#8211; adresse IP:\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_A));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; A\n            [ip] =&gt; 64.131.72.23\n            [class] =&gt; IN\n            [ttl] =&gt; 14046\n        )"},{"id":"text-6","heading":"Text","content":")\nphp&gt;\nUne autre méthode simple pour obtenir l’enregistrement A ou l’adresse IP d’un nom de domaine consiste à utiliser la fonction gethostbyname:\nphp&gt; print_r (gethostbyname (&#39;www.binarytides.com&#39;));\n64.131.72.23\nphp&gt;\nUne autre méthode, gethostbynamel, donnerait un tableau d&#39;adresses IP:\nphp&gt; print_r (gethostbynamel (&#39;www.google.com&#39;));\nTableau\n(\n    [0] =&gt; 74.125.71.147\n    [1] =&gt; 74.125.71.99\n    [2] =&gt; 74.125.71.104\n    [3] =&gt; 74.125.71.106\n    [4] =&gt; 74.125.71.105\n    [5] =&gt; 74.125.71.103\n)\nphp&gt;\nEnregistrement MX &#8211; Serveur mail:\nLes enregistrements MX donnent le serveur de messagerie pour un domaine donné. Ces serveurs de messagerie peuvent être utilisés pour envoyer des courriers à un certain courrier sur ce domaine, par exemple. [email protected]\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_MX));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; MX\n            [pri] =&gt; 0\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 14400\n        )"},{"id":"text-7","heading":"Text","content":")\nphp&gt;\nPour les enregistrements MX, il existe une fonction alternative appelée getmxrr, qui peut être utilisée comme ceci:\nphp&gt; getmxrr (&#39;www.binarytides.com&#39;, $ mxhosts);\nphp&gt; print_r ($ mxhosts);\nTableau\n(\n    [0] =&gt; binarytides.com\n)\nphp&gt;\nIl retourne un tableau de mxhosts pour un nom d&#39;hôte / domaine donné.\nCNAME Records &#8211; Alias ​​Canonical:\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_CNAME));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; www.binarytides.com\n            [type] =&gt; CNAME\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 13932\n        )"},{"id":"text-8","heading":"Text","content":")\nphp&gt;\nAvec l&#39;option DNS_ALL, vous pouvez obtenir toutes les informations ci-dessus en même temps:\nphp&gt; print_r (dns_get_record (&#39;www.binarytides.com&#39;, DNS_ALL));\nTableau\n(\n    [0] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; A\n            [ip] =&gt; 64.131.72.23\n            [class] =&gt; IN\n            [ttl] =&gt; 14202\n        )"},{"id":"text-9","heading":"Text","content":"[1] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro2.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86344\n        )"},{"id":"text-10","heading":"Text","content":"[2] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; NS\n            [target] =&gt; omikro1.allwebserver.com\n            [class] =&gt; IN\n            [ttl] =&gt; 86344\n        )"},{"id":"text-11","heading":"Text","content":"[3] =&gt; Tableau\n        (\n            [host] =&gt; www.binarytides.com\n            [type] =&gt; CNAME\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 13800\n        )"},{"id":"text-12","heading":"Text","content":"[4] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; SOA\n            [mname] =&gt; host1.allwebserver.com\n            [rname] =&gt; omikrosys.gmail.com\n            [serial] =&gt; 2011020202\n            [refresh] =&gt; 86400\n            [retry] =&gt; 7200\n            [expire] =&gt; 3600000\n            [minimum-ttl] =&gt; 86400\n            [class] =&gt; IN\n            [ttl] =&gt; 86344\n        )"},{"id":"text-13","heading":"Text","content":"[5] =&gt; Tableau\n        (\n            [host] =&gt; binarytides.com\n            [type] =&gt; MX\n            [pri] =&gt; 0\n            [target] =&gt; binarytides.com\n            [class] =&gt; IN\n            [ttl] =&gt; 14199\n        )"},{"id":"text-14","heading":"Text","content":")\nphp&gt;\nLes autres options disponibles sont:DNS_HINFO, DNS_PTR, DNS_SOA, DNS_TXT, DNS_AAAA, DNS_SRV, DNS_NAPTR, DNS_A6, DNS_ANY.\nRéférences :\n1. Manuel sur: http://php.net/manual/en/function.dns-get-record.php\nDernière mise à jour le: 27 mai 2013"},{"id":"text-15","heading":"Text","content":"Click to rate this post!\n                                   \n                               [Total: 0  Average: 0]"}],"media":{"primary_image":""},"relations":[{"rel":"canonical","href":"https://tutos-gameserver.fr/2019/10/19/php-get-dns-nameserver-cname-mx-a-records-dun-domaine-binarytides-bien-choisir-son-serveur-d-impression/"},{"rel":"alternate","href":"https://tutos-gameserver.fr/2019/10/19/php-get-dns-nameserver-cname-mx-a-records-dun-domaine-binarytides-bien-choisir-son-serveur-d-impression/llm","type":"text/html"},{"rel":"alternate","href":"https://tutos-gameserver.fr/2019/10/19/php-get-dns-nameserver-cname-mx-a-records-dun-domaine-binarytides-bien-choisir-son-serveur-d-impression/llm.json","type":"application/json"},{"rel":"llm-manifest","href":"https://tutos-gameserver.fr/llm-endpoints-manifest.json","type":"application/json"}],"http_headers":{"X-LLM-Friendly":"1","X-LLM-Schema":"1.1.0","Content-Security-Policy":"default-src 'none'; img-src * data:; style-src 'unsafe-inline'"},"license":"CC BY-ND 4.0","attribution_required":true,"allow_cors":false}