Duplicated Ads running on my site

Discussion in 'Co-op Advertising Network' started by matt6805, Apr 4, 2005.

  1. #1
    I made the most recent update to the ad_network.php file (Mar 31, 2005) as well as passthru.php, but now I have duplicate ads running on my site. I've read in other threads to keep refreshing and this problem will resolve itself, but it's not working. The links are on the bottom of my website.

    Here is my passthru.php code:

    <?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 ", '<br><table width="800" cellpadding="0" cellspacing="0" border="0"><tr><td align="center"><font face="verdana" size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Connections:&nbsp;&nbsp;' . $ad_network . ' | ' . $ad_network . ' | ' . $ad_network . ' | ' . $ad_network . ' | ' . $ad_network . '</font>' . '</td>' . '</tr><tr><td align="center"><font face="verdana" size="1"><a href="http://www.digitalpoint.com/tools/ad-network/?s=1103" target="_new">Digital Point</a></font></td></tr>' . '</table>' . '<br>' . '</body>', file_get_contents(str_replace ('../', '', $_REQUEST['file'])));
    
    
    ?> 
    Code (markup):
    Any sugesstions? The website is http://www.sedonamonthly.com
    Thanks.
     
    matt6805, Apr 4, 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
    If you look at your preg_replace line, you are calling $ad_network 5 times (which you don't need to).
     
    digitalpoint, Apr 4, 2005 IP
  3. matt6805

    matt6805 Guest

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I've also tried calling $ad_network once, and it just displays one ad. I want to display between 4 or 5.
     
    matt6805, Apr 4, 2005 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    How many ads did you tell it to display on the setup screen?
     
    digitalpoint, Apr 4, 2005 IP
  5. matt6805

    matt6805 Guest

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    totally missed the screen you were talking about. Found it and fixed the issue. Thanks for your help. Much appreciated :)
     
    matt6805, Apr 4, 2005 IP