Problem getting ads to show with full URL

Discussion in 'Co-op Advertising Network' started by mdmsports, Apr 26, 2005.

  1. #1
    Hi, I've just joined the coop yesterday and have been fighting a problem for 2 days now. I've played around enough to find out what's happening, and hopefully someone can help.

    I've put code into my pages:
    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('http://www.a1-vitamins-and-supplements.com/ad_network_237.php');
    echo $ad_network;
    ?>

    and the .txt file does get written to, but no ads show. But wait...

    When I change the include to just "ad_network_237.php", it works fine.

    Now that I've taken out the full URL in the include on all pages, I was able to successfully validate. But I have other sites with subdirectories to add to the network later, won't I have to use full URL's, I would like to get it to work the way I intended.

    I get no messages with the full URL, just no ads and no validate.

    The other thing is, I've had all along other PHP includes (actually I'm using PHP require instead, but should be the same right?), to pull in a file with my site navigation code, and it has the full URL, and no problem. What I use for that is:

    <?php require ("http://www.a1-vitamins-and-supplements.com/sitenav1.php"); ?>

    Any ideas why it didn't work on my ad code?

    Thanks. Dennis.
     
    mdmsports, Apr 26, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    The short answer is you can't use an include that is URL based.
     
    digitalpoint, Apr 26, 2005 IP