All .htm site - Ads not showing since update??

Discussion in 'Co-op Advertising Network' started by chops, Apr 3, 2005.

  1. #1
    It used to work fine. I have updated the ad_network.php and modified it (and altered back the file names from _214 back to the original in all necessary places)
    I use the following htccess:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} ^(.*).htm [NC,OR]
    RewriteCond %{REQUEST_FILENAME} ^(.*).html [NC]
    RewriteRule ^(.*) /passthru.php?file=$1
    </IfModule>

    I use the following passthru.php
    <?php

    if (!function_exists('file_get_contents')) {
    function file_get_contents($url) {
    $handle = fopen($url, 'r');
    $string = fread($handle, 4096000);
    fclose($handle);
    return $string;
    }
    }

    include ('ad_network.php');
    echo preg_replace ("/<\/body>/i", $ad_network[0] . '</body>', file_get_contents(str_replace ('../', '', $_REQUEST['file'])));

    ?>

    And I have a ad_network_ads.txt which is set up as a 777

    What actually shows at the bottom of each site page is just "<"
    No ads!! Help please anyone?
     
    chops, Apr 3, 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
    Towards the end, change this: $ad_network[0] to this: $ad_network
     
    digitalpoint, Apr 3, 2005 IP
  3. chops

    chops Well-Known Member

    Messages:
    199
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Perfect -Thanks!!
     
    chops, Apr 3, 2005 IP