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.

slow loading ads

Discussion in 'Co-op Advertising Network' started by skattabrain, Sep 27, 2004.

  1. #1
    trying to integrate this on one of my sites, but it's soooo slow loading that's i had to yank it. here is is on a pae with nothing besides the ad... http://www.chella.com/testing.php

    i mean... it's bad. any idea what could be wrong?

    i created 1 account, posted the ads and got it working. the created by referral this new account, i have no idea what's the issue
     
    skattabrain, Sep 27, 2004 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    Is the new account using the same physical server that your account that was working faster? Assuming you are using the cache file properly, it should be pretty much instant (which obviously it's not)?
     
    digitalpoint, Sep 28, 2004 IP
  3. skattabrain

    skattabrain Peon

    Messages:
    628
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #3
    differernt server, same hosting company, same datacenter. i host all my clients on the same server, except this one client, which has their own reseller account on a differernt server.
     
    skattabrain, Sep 29, 2004 IP
  4. skattabrain

    skattabrain Peon

    Messages:
    628
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #4
    surely it's the server, i tried a differernt domain on that server and get the same exact problem.

    any idea what i can mention to the host's support team?
     
    skattabrain, Sep 29, 2004 IP
  5. skattabrain

    skattabrain Peon

    Messages:
    628
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #5
    struggling with this, when i remove it, all is well...

    the file is writable, it works... it just takes 10 seconds to work.

     
     
    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?color=ffffff');
    $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;
    }
     
     
    
    Code (markup):
     
    skattabrain, Sep 29, 2004 IP
  6. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #6
    Not sure... I guess you could take parts of it out slowly until you find the part that is causing it to slow down, then debug it from there.
     
    digitalpoint, Sep 29, 2004 IP
  7. skattabrain

    skattabrain Peon

    Messages:
    628
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #7
    support wrote this back....

      
     
    I bet this line is the problem: 
    
    $ads[] = file_get_contents ('[url="http://ads.digitalpoint.com/network.php?color=ffffff');"][color=#0000ff]http://ads.digitalpoint.com/network.php?color=ffffff');[/color][/url]
    
    Please try to replace the remote connection with an actual file on the server, just for testing and I bet you will receive a similar performance as on the server that works fine for you.
     
    
    Code (markup):
     
    skattabrain, Sep 30, 2004 IP
  8. Infiniterb

    Infiniterb Well-Known Member

    Messages:
    1,314
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    168
    #8
    I'm having the same issue with the file_get_contents...was there ever a fix for this?
     
    Infiniterb, Nov 18, 2004 IP
  9. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Which php version are you using ?

    I believe there were problems with that syntax in older versions of php
     
    cyanide, Nov 22, 2004 IP