{"id":145,"date":"2016-05-09T08:22:50","date_gmt":"2016-05-09T08:22:50","guid":{"rendered":"http:\/\/www.3pixls.com\/blog\/?p=145"},"modified":"2016-05-27T15:23:13","modified_gmt":"2016-05-27T15:23:13","slug":"limit-access-to-designated-ip-addresse","status":"publish","type":"post","link":"https:\/\/www.3pixls.com\/blog\/limit-access-to-designated-ip-addresse\/","title":{"rendered":"Limit Access to Designated IP Addresse"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"alignnone size-large wp-image-147\" src=\"http:\/\/www.3pixls.com\/blog\/wp-content\/uploads\/2016\/05\/image1-1024x450.jpg\" alt=\"image1\" width=\"1024\" height=\"450\" srcset=\"https:\/\/www.3pixls.com\/blog\/wp-content\/uploads\/2016\/05\/image1-1024x450.jpg 1024w, https:\/\/www.3pixls.com\/blog\/wp-content\/uploads\/2016\/05\/image1-300x132.jpg 300w, https:\/\/www.3pixls.com\/blog\/wp-content\/uploads\/2016\/05\/image1-768x337.jpg 768w, https:\/\/www.3pixls.com\/blog\/wp-content\/uploads\/2016\/05\/image1.jpg 1688w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>[php]<br \/>\n&lt;?php $allow = array(&quot;192.168.0.103&quot;, &quot;45.120.124.38&quot;, &quot;789.123.456&quot;);<\/p>\n<p>if(!in_array($_SERVER[&#8216;REMOTE_ADDR&#8217;], $allow) &amp;&amp; !in_array($_SERVER[&quot;HTTP_X_FORWARDED_FOR&quot;], $allow)) {<\/p>\n<p>\t$retry = 60 * 60; \/\/ = 60 minutes<\/p>\n<p>\theader(&quot;HTTP\/1.1 503 Service Unavailable&quot;);<\/p>\n<p>\theader(&quot;Retry-After: $retry&quot;);<\/p>\n<p>\techo &quot;<br \/>\n&lt;h1&gt;Site update in progress &#8211; Please return in 60 minutes!&lt;\/h1&gt;<\/p>\n<p>&quot;;<\/p>\n<p>\texit();<\/p>\n<p>} ?&gt;[\/php]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[php] &lt;?php $allow = array(&quot;192.168.0.103&quot;, &quot;45.120.124.38&quot;, &quot;789.123.456&quot;); if(!in_array($_SERVER[&#8216;REMOTE_ADDR&#8217;], $allow) &amp;&amp; !in_array($_SERVER[&quot;HTTP_X_FORWARDED_FOR&quot;], $allow)) { $retry = 60 * 60; \/\/ = 60 minutes header(&quot;HTTP\/1.1 503 Service Unavailable&quot;); header(&quot;Retry-After: $retry&quot;); echo &quot; &lt;h1&gt;Site update in progress &#8211; Please return in 60 minutes!&lt;\/h1&gt; &quot;; exit(); } ?&gt;[\/php]<\/p>\n","protected":false},"author":1,"featured_media":147,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8,9],"tags":[],"_links":{"self":[{"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/posts\/145"}],"collection":[{"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/comments?post=145"}],"version-history":[{"count":4,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/posts\/145\/revisions"}],"predecessor-version":[{"id":155,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/posts\/145\/revisions\/155"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/media\/147"}],"wp:attachment":[{"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/media?parent=145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/categories?post=145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/tags?post=145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}