Error when remotely placing simple php code
In http://mysite.com/adverts.php is this code hosting the numbers :
<?
$bannerCounter= 1;
$bannerCode[$bannerCounter] = " 111-369-3494 ";
$bannerCounter++;
$bannerCode[$bannerCounter] = " 222-423-5720 ";
$bannerCounter++;
$bannerCode[$bannerCounter] = " 333-369-3494 ";
$bannerCounter++;
$bannerCode[$bannerCounter] = " 444-423-5720 ";
$bannerCounter++;
$bannerCode[$bannerCounter] = " 555-369-3494 ";
$bannerCounter++;
$bannerCode[$bannerCounter] = " 666-423-5720 ";
$bannerCounter++;
$bannerAdTotals = $bannerCounter - 1;
if($bannerAdTotals>1)
{
mt_srand((double)microtime() * 1234567);
$bannerPicked = mt_rand(1, $bannerAdTotals);
}
else
{
$bannerPicked = 1;
}
$bannerAd2 = $bannerCode[$bannerPicked];
?>
Then in http://mysite.com/index.php this code is placed to rotate the numbers :
<?
include_once("test1.php");
echo " $bannerAd2 ";
?>
Could use many enhancements, but it works.
Now when I put the second code on a different website (So I do not have to make the adverts.php section for each) http://website2.com/index.php link this :
<?
include_once("http://mywebsite.com/test1.php");
echo " $bannerAd2 ";
?>
I get this error :
Warning: include_once() [function.include-once]: URL file-access is disabled in the server configuration in /home/stopfore/www/www/test.php on line 24
I have numerous other applications, and reasons I want to just place the last piece on other websites with out having to make the initial adverts.php page for each site. What simple thing am I missing?
Thanks,
Scot
-
Spencer Westwood -
[ 1 ] Thanks
{{ DiscussionBoard.errors[286098].message }} -
-
scotl47 -
Thanks
{{ DiscussionBoard.errors[286289].message }} -
-
floatingatoll -
Thanks
{{ DiscussionBoard.errors[287661].message }} -