{"id":274,"date":"2024-10-03T08:23:58","date_gmt":"2024-10-03T07:23:58","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=274"},"modified":"2025-02-06T12:48:44","modified_gmt":"2025-02-06T12:48:44","slug":"mwnci-ipincidr-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-ipincidr-function\/","title":{"rendered":"Mwnci ipincidr() Function"},"content":{"rendered":"<h2><span id=\"Syntax\" class=\"mw-headline\">Syntax<\/span><\/h2>\n<p>ipincidr(<i><b>cidr<\/b><\/i>, <i><b>ip address<\/b><\/i>)<\/p>\n<h2><span id=\"Description\" class=\"mw-headline\">Description<\/span><\/h2>\n<p>The <i>ipincidr()<\/i> function will return the <i>ip address<\/i> if it belongs in the <i>cidr<\/i> range, or <i>false<\/i> if not.<\/p>\n<h2><span id=\"Example\" class=\"mw-headline\">Example<\/span><\/h2>\n<pre>if (ipincidr(\"192.168.0.0\/24\", \"192.168.0.1\")) {\r\n    println(\"IP is in the cidr block\")\r\n}\r\n\r\n\r\nIP is in the cidr block\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax ipincidr(cidr, ip address) Description The ipincidr() function will return the ip address if it belongs in the cidr range, or false if not. Example if (ipincidr(&#8220;192.168.0.0\/24&#8221;, &#8220;192.168.0.1&#8221;)) { println(&#8220;IP is in the cidr block&#8221;) } IP is in the cidr block<\/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-274","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/274","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=274"}],"version-history":[{"count":3,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/274\/revisions"}],"predecessor-version":[{"id":1081,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/274\/revisions\/1081"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}