Hi
I want to include file from external domain.
for example i have 2 domains http://www.hiox.com and http://www.withfriendship.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.hiox.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?
How to include file from external domain
Moderator: General Moderators
How to include file from external domain
Last edited by arathi on Fri Jul 20, 2007 5:04 am, edited 1 time in total.
if the webserver at hiox.com has php installed your script will only include the output of testscript.phparathi wrote:include('http://www.hiox.com/testscript.php');
e.g.
Code: Select all
// testscript.php
if ( isset($a) ) {
echo $a;
}
else {
echo 'default';
}Code: Select all
$a = 'xyz';
include include('http://www.hiox.com/testscript.php');-
Phoenixheart
- Forum Contributor
- Posts: 123
- Joined: Tue Nov 16, 2004 7:46 am
- Contact: