Centering Ads (passthru method)

Discussion in 'Co-op Advertising Network' started by dcristo, Sep 22, 2005.

  1. #1
    Previous to updating the coop I had no problems getting the coop ads centered in the footer of the page, but for some reason after the mandantory update using the passthru method on html files I can't get it to work. My passthru code is as follows:

    
    <?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_377.php'); echo preg_replace ("/<\/body>/i", $ad_network . '</body>', file_get_contents(str_replace ('../', '', $_REQUEST['file']))); ?>
    
    Code (markup):
    From my understanding, I want to center the variable $ad_network using the <center> tags, however everything I have tried doesnt work.

    Any help would be appreciated.

    Thanks
     
    dcristo, Sep 22, 2005 IP
  2. dcristo

    dcristo Illustrious Member

    Messages:
    19,796
    Likes Received:
    1,201
    Best Answers:
    7
    Trophy Points:
    470
    Articles:
    5
    #2
    I still havent figured this out, would really appreciate help on this.

    Thanks
     
    dcristo, Sep 27, 2005 IP
  3. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #3
    <?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_377.php'); echo preg_replace ("/<\/body>/i", '<center>' . $ad_network . '</center></body>', file_get_contents(str_replace ('../', '', $_REQUEST['file']))); ?>
    PHP:
     
    digitalpoint, Sep 27, 2005 IP
  4. dcristo

    dcristo Illustrious Member

    Messages:
    19,796
    Likes Received:
    1,201
    Best Answers:
    7
    Trophy Points:
    470
    Articles:
    5
    #4
    Cheers Shawn.

    I really have to learn PHP aye.
     
    dcristo, Sep 27, 2005 IP