If you have a script on a remote server and you are using PHP5, then you will not be able to use include() or require().

I learned that while trying to include a script on a subdomain (for speed).

The only solution is to use the file_get_contents() function instead.

That’s all. Your remote inclusion will now work.

Also view official documentation.

5 Responses to Include Remote Files With PHP

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>