1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Can't Validate - Trying to set it up

Discussion in 'Co-op Advertising Network' started by yonnermark, Sep 8, 2004.

  1. #1
    I've created an account, created & uploaded the necessary files to my server. I've made sure the ad_network_ads.txt is set to CHMOD 777. My server is definately php friendly and is an up to date installation as far as I know. I've uploaded the .htaccess file.
    SEMrush
    However, my site will not validate and I don't see any ads appearing on my site's pages. If anyone can suggest where I might be going wrong, that would be great. If you PM me I will send you the url so you can check the files.

    Thanks
    Mark
     
    yonnermark, Sep 8, 2004 IP
    SEMrush
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,297
    Likes Received:
    2,602
    Best Answers:
    461
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    What's the URL?
     
    digitalpoint, Sep 8, 2004 IP
  3. joeychgo

    joeychgo Notable Member

    Messages:
    3,368
    Likes Received:
    321
    Best Answers:
    0
    Trophy Points:
    255
    #3
    same problem here

    site in my sig


    Screwing up my Archive
     
    joeychgo, Sep 8, 2004 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,297
    Likes Received:
    2,602
    Best Answers:
    461
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    Not sure on that... but for whatever reason it's not being evaluated as PHP. Have you tried it on the default archive? (No idea on the modded one)
     
    digitalpoint, Sep 8, 2004 IP
  5. joeychgo

    joeychgo Notable Member

    Messages:
    3,368
    Likes Received:
    321
    Best Answers:
    0
    Trophy Points:
    255
    #5
    never mind, cause a database error on the site which through off all my users, including a deep crawl by google. other issues. forget it. Nothing personal........
     
    joeychgo, Sep 8, 2004 IP
  6. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    my url is:
    www.smart-pianos.com
     
    yonnermark, Sep 9, 2004 IP
  7. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,297
    Likes Received:
    2,602
    Best Answers:
    461
    Trophy Points:
    710
    Digital Goods:
    29
    #7
    Everything looks like it's setup properly except for the part that includes the ad_network.php file. What's the exact PHP code you put in your page(s)?
     
    digitalpoint, Sep 9, 2004 IP
  8. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I followed the setup instructions exactly. It didn't say anything about putting php code into my pages. I thought maybe the .htaccess file would insert it or something (!!)

    So what do I do about that?
    Do I have to convert all my .htm files to .php and then add some php code where I want the ads to appear?

    The setup didn't really walk me through those stages :(
     
    yonnermark, Sep 9, 2004 IP
  9. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    here's the code contained within ad_network.php

    <?php

    $ad_file = 'ad_network_ads.txt';
    for ($i = 0; $i <= 11; $i++) {
    $p = substr ('../../../../../../../../../../', 0, $i * 3);
    if (file_exists ($p . $ad_file)) {
    $ad_file = $p . $ad_file;
    break;
    }
    }

    if (is_writable ($ad_file)) {
    $ads = file_get_contents ($ad_file);
    $ads = explode ('<ad_break>', $ads);

    if (count ($ads) < 101 || $ads[0] + 3600 < time()) {
    $ads[] = file_get_contents ('http://ads.digitalpoint.com/network.php?type=link');
    $ads[0] = time();
    if (count ($ads) > 101) unset ($ads[1]);
    $file = fopen($ad_file, 'w');
    fwrite ($file, implode ('<ad_break>', $ads));
    fclose ($file);
    $ad_network = end ($ads);
    } else {
    $ad_network = $ads[rand(1,count($ads))];
    }
    $ad_network .= '<!-- an-hl -->';
    } else {
    $ad_network = 'You must set the "ad_network_ads.txt" file to be writable.';
    }
    if (substr ($_SERVER['DOCUMENT_NAME'], -6) == '.shtml') {
    ini_set ('zlib.output_compression', 0);
    echo $ad_network;
    }

    ?>
     
    yonnermark, Sep 9, 2004 IP
  10. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    A little help here people :)
     
    yonnermark, Sep 10, 2004 IP
  11. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    What code do I place into my html files?
    Thanks
    Mark
     
    yonnermark, Sep 10, 2004 IP
  12. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,297
    Likes Received:
    2,602
    Best Answers:
    461
    Trophy Points:
    710
    Digital Goods:
    29
    #12
    That's what I'm asking you... did you place the exact code in your files that is listed in the setup, or something else?
     
    digitalpoint, Sep 10, 2004 IP
  13. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #13
    I didn't put any code in my files because the setup didn't tell me to (as far as I could see). It told me to create a file ad_network.php and upload it to root directory but I don't remember being told to insert any code into my files.

    I think the concept and principle of this network is great, don't get me wrong, I'm dieing to get on board but I do feel the setup could be more step-by-step.

    thanks for the awesome service, I hope to onboard soon.

    Regards,
    Mark
     
    yonnermark, Sep 10, 2004 IP
  14. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,297
    Likes Received:
    2,602
    Best Answers:
    461
    Trophy Points:
    710
    Digital Goods:
    29
    #14
    digitalpoint, Sep 10, 2004 IP
  15. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #15
    I did step 1, 2 and 3
    I skipped step 4 because it said "For a PHP based site..." and my site is not php based,
    I skipped step 5 because it said "For a SHTML based site..." and my site is not shtml based

    As a test I have just tried adding the following code to my site template but it still won't validate:
    <!--#include virtual="/ad_network.php" -->

    Feels like I'm nearly there now. What am I doing wrong?
     
    yonnermark, Sep 10, 2004 IP
  16. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,297
    Likes Received:
    2,602
    Best Answers:
    461
    Trophy Points:
    710
    Digital Goods:
    29
    #16
    If you did step 3, then you are PHP based, so do step 4. :)
     
    digitalpoint, Sep 10, 2004 IP
  17. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Awesome, I've just been validated.
    Shawn, mate, those step-by-step instructions are not quite step-by-step imho :)
    I'm very excited to be onboard the network.

    So when do my ads start to show?
    thanks
    Mark
     
    yonnermark, Sep 11, 2004 IP
  18. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #18
    yonnermark, Sep 11, 2004 IP
  19. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,297
    Likes Received:
    2,602
    Best Answers:
    461
    Trophy Points:
    710
    Digital Goods:
    29
    #19
    Hard to say... I see the site is already PHP, but for whatever reason that clip isn't be interpreted as PHP.

    Is the code in a footer include file/template or something?
     
    digitalpoint, Sep 11, 2004 IP
  20. kepa

    kepa Peon

    Messages:
    134
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Also, check to see if the code was copied correctly. Your source code shows that it is missing the
    	
    echo $ad_network;
    
    Code (markup):
    just before the closing
    ?>
     
    kepa, Sep 11, 2004 IP