PHP5 - Using an external URL with the include function

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: ... # 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.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « PHP5 - Using an external URL with the include function », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (