[FX.php List] Accessing a php file residing on an external server
Troy Meyers
tcmeyers at troymeyers.com
Sat Oct 11 12:42:02 MDT 2008
Jonathan,
Perhaps you could use fsockopen() to retrieve the file contents as HTML, then html_entity_decode() to clean that up into normal text, then write that to a local PHP file on the fly, which you could then include? Or maybe there's a PHP function that will "execute" PHP text that's in a variable. I don't know if there is.
-Troy
> This might be a pure PHP problem or an Apache problem, but it affects
> my fx.php project...
>
> Is there are trick to doing an include for a file residing on an
> external server?
>
> I use this in the target page:
>
> require('http://000.000.000.000/test.php');
>
> echo $value;
>
> The file test.php has a single line as follows: $value = "Hello
> World";
>
> echo $value produces no results at all.
>
> Am I doing something wrong?
>
> Remote server is OS X Server 10.2 running Php 5
>
> Thanks
>
> Jonathan
More information about the FX.php_List
mailing list