Can one in Php load an include file from another Web site

Hello,

Say I have a file test.php which is on www.x1.com web site.

Can this file have in it an include file like this:
include ‘http://www.x2.com/include/reply.php’;

I guess the answer is not, since I am getting Error message that the function that I want in
http://www.x2.com/include/reply.php is not defined in test.php of x1.com web site, but I just to double check
and make sure there is no way around this.

Regards,

Depending on your settings you may be able to grab it with [fphp]file_get_contents/fphp – but presumably you want to run the contents of that file through the parser?

I’d consider using wget or cURL to fetch the file – store it on my own server at set intervals maybe – as long as you are totally and absolutely sure that file can never, ever contain anything bad.

Hi,

So the answer is that php pages on x1.com cannot load php pages on x2.com via include command.
And both of these servers our, so no it wont contain anything bad.

Thanx

It would be different if both domains were the same machine.

yes …until your server allows remote file include which is set in your server php.ini settings…
fopen and remote file include setting

but if you are including file of site a and it goes down
you may get fatal error in your site…so be careful

Ok, ThanX.