Knowledgebase: PHP
Why can't I include a remote php file (ie include(""))?
Posted by Arvand Sabetian (Import) on 13 May 2009 11:03 PM
Both including a PHP file and the ability to include a PHP file could have very high security risks for your site and the entire server. A hacker who gains access to your account through improper coding is going to have a much easier time executing code on the system if he/she is allowed to include remote files.

In most cases, the reason you are including a remote file is to have the content show up on your web page. If that is the case, then you will be able to use the following function and still maintain the security of your website in regards to including remote php files:

echo ( file_get_contents( "") );
(186 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).