{"id":939,"date":"2024-12-13T13:51:22","date_gmt":"2024-12-13T13:51:22","guid":{"rendered":"https:\/\/monkey.ploogie.co.uk\/?page_id=939"},"modified":"2024-12-13T14:02:57","modified_gmt":"2024-12-13T14:02:57","slug":"mwnci-lookupmx-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-lookupmx-function\/","title":{"rendered":"Mwnci lookupmx() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>lookupmx<strong>(<em>string<\/em>)<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>lookupmx()<\/i> function returns the DNS MX records for the given domain name sorted by preference.<\/p>\n<p>The returned mail server names are validated to be properly formatted presentation-format domain names. If the response contains invalid names, those records are filtered out.<\/p>\n<p>If no records are found, an empty array is returned<\/p>\n<h2>Example<\/h2>\n<pre>\r\nprintln(lookupmx(\"google.co.uk\"))\r\nprintln(lookupmx(\"google.co.yewkay\"))\r\n\r\n\r\n[\"smtp.google.com. 0\"]\r\n[]\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax lookupmx(string) Description The lookupmx() function returns the DNS MX records for the given domain name sorted by preference. The returned mail server names are validated to be properly formatted presentation-format domain names. If the response contains invalid names, those records are filtered out. If no records are found, an empty array is returned Example &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-lookupmx-function\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mwnci lookupmx() Function&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-939","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/939","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=939"}],"version-history":[{"count":2,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/939\/revisions"}],"predecessor-version":[{"id":941,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/939\/revisions\/941"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}