Jump to content

include remote php file?


B34ST

Recommended Posts

Hi I was wondering if it was possible to include a php file which is hosted on a different domain?

 

for example i have 2 domains http://www.example.com and http://example2.com i have a php script on example.com which i want to include in another script on example2.com.

 

I tried to just simply include the script:

 

include('http://www.example.com/testscript.php');

 

but this does not seem to work. When I checked the manual it said that this is possible as long as the php version is greater than 4.3.0 (which mine is on both domains) and allow_url_fopen is enabled ehich it is on both domains.

 

am i missing something? or is there another way of doing this?

Link to comment
https://forums.phpfreaks.com/topic/59543-include-remote-php-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.