Setup Help With New File

Discussion in 'Co-op Advertising Network' started by bloodwrath, Mar 31, 2005.

  1. #1
    Shawn
    Sweet updates
    makes it very easy to add more ads
    and seperating them
    bravo!!!!

    but this is all i get on http://www.supportcave.com/
    Y | o | u | | m
    on all my pages
    redid the file 2x and cleared out the .txt file
    any ideas!
     
    bloodwrath, Mar 31, 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
    Hmmm... looks like it might be trying to tell you "You must set your file to be writable". Strange it would split each character into an array though. Check that your .txt file is writable.
     
    digitalpoint, Mar 31, 2005 IP
  3. bloodwrath

    bloodwrath Active Member

    Messages:
    1,364
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    90
    #3
    read this again
    so i have to change all my html code:(


    Because of this, the output of the $ad_network variable is no longer an array. For example, if you were outputting
    $ad_network[0] for a single ad before, you would need to change that to plain old $ad_network (that variable will contain
    everything you are outputting [including multiple ads]).
     
    bloodwrath, Mar 31, 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
    You could probably hack around on the ad_network.php file if you really want, to put it back into an array, but it really should be updated (you may also want to think about using an include so you only have to do it on one file).
     
    digitalpoint, Mar 31, 2005 IP
  5. bloodwrath

    bloodwrath Active Member

    Messages:
    1,364
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    90
    #5
    I fix my code in the next few days
    untill then ive put back the old add network file
     
    bloodwrath, Mar 31, 2005 IP
  6. sadcox66

    sadcox66 Spirit Walker

    Messages:
    496
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I got that too.
    I had to move the .txt file to the http root and that fixed it.
    try moving the file .txt file to
    /httpdocs
    or
    /www
    and chmod 777
     
    sadcox66, Mar 31, 2005 IP
  7. gemini

    gemini Peon

    Messages:
    256
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I had the same message about making my txt file writable, but it was already chmoded to 666. Anyways, I looked into Shawn's code and saw that the new txt file name was a little fdifferent from mine - it had "_212" at the end, so I changed the name and it worked.

    Thank you very much for the update Shawn! Very excited to see the charts :)
     
    gemini, Mar 31, 2005 IP
  8. CalBoy

    CalBoy Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    What about passthru.php? Just change $ad_network[0] to $ad_network?

    Is the following good?

    <?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 . '</body>', file_get_contents(str_replace ('../', '', $_REQUEST['file'])));

    ?>

    Thanks
     
    CalBoy, Mar 31, 2005 IP
  9. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #9
    Yeah, that should work.
     
    digitalpoint, Mar 31, 2005 IP
  10. Cygnus

    Cygnus Cat Herder

    Messages:
    172
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #10
    Thanks for even bringing that up Calboy; it solved my problem with my current config.
     
    Cygnus, Mar 31, 2005 IP
  11. Bulldog San

    Bulldog San Peon

    Messages:
    195
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Will the passthru.php above work for displaying 5 ads?
     
    Bulldog San, Apr 1, 2005 IP
  12. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #12
    It should, yes.
     
    digitalpoint, Apr 1, 2005 IP