PHP5 - Using an external URL with the include function

December 2016






Normally the option to include external URL (e.g absolute, shape http://site.tld/url) via

the function include is disabled by default in php5 versions, to activate this option on your server put these two lines in your php.ini :

allow_url_include = 1 
allow_url_fopen = 1 


For more information, see: http://www.php.net/ ... # ini.allow-url-fopen

Note that:it can be very dangerous to activate the option allow_url_include.
Indeed it may, in some cases, pose serious security vulnerabilities.

Related :

This document entitled « PHP5 - Using an external URL with the include function » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.