{"id":7359,"date":"2018-04-26T11:19:47","date_gmt":"2018-04-26T11:19:47","guid":{"rendered":"http:\/\/phpcodez.com\/?p=7359"},"modified":"2018-04-26T11:19:47","modified_gmt":"2018-04-26T11:19:47","slug":"allow_url_include","status":"publish","type":"post","link":"http:\/\/phpcodez.com\/allow_url_include\/","title":{"rendered":"allow_url_include"},"content":{"rendered":"<p>The PHP option allow_url_include normally allows a programmer to include() a remote file (as PHP code) using a URL rather than a local file path. For security reasons, this feature should be disabled. If a script claims to require this feature, you should look into alternative software, as the use of this feature indicates serious design flaws.<\/p>\n<p>There are a number of reasons why URL includes should always be avoided:<\/p>\n<p>It&#8217;s insecure \u2013 if your application can be tricked into including content from a URL outside itself (and there are a number of common ways this can happen), an attacker can force your application to start running code from their own web site.<\/p>\n<p>It&#8217;s inefficient \u2013 if your PHP script includes content from a URL, then the web server must make HTTP requests to generate the page. This makes your page load much slower than necessary, especially if the site you&#8217;re loading content from is responding slowly.<\/p>\n<p>It&#8217;s unreliable, for the same reasons \u2013 if the web server you are loading content from occasionally fails to respond, your web site also sometimes fails to load properly.<\/p>\n<p>It&#8217;s usually unnecessary \u2013 in most cases, allow_url_include can be avoided either by including the content directly (if it is being loaded from a domain you host) or by loading and printing the content without evaluating it as PHP.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The PHP option allow_url_include normally allows a programmer to include() a remote file (as PHP code) using a URL rather than a local file path. For security reasons, this feature should be disabled. If a script claims to require this feature, you should look into alternative software, as the use of this feature indicates serious &hellip; <a href=\"http:\/\/phpcodez.com\/allow_url_include\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">allow_url_include<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[99,242,370,405,428],"class_list":["post-7359","post","type-post","status-publish","format-standard","hentry","category-php","tag-code","tag-injection","tag-php","tag-remote","tag-security"],"_links":{"self":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/7359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/comments?post=7359"}],"version-history":[{"count":0,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/7359\/revisions"}],"wp:attachment":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/media?parent=7359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/categories?post=7359"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/tags?post=7359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}