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.

file_get_contents bad ad breaking site

Discussion in 'Co-op Advertising Network' started by bobafind, Aug 22, 2004.

  1. #1
    Every once in a while an ad gets served that breaks my site layout because it causes an ugly php warning talking about file_get_contents. It only pops up rarely, but obviously if it throws the layout of the site off it's pretty big. I guess I could build in error handling, but is there any way to have ads rechecked once in a while or so, or is this something that would not be picked up in the validation?

    As soon as I see the error again, I'll jot down the warning / error.

    I'll keep y'all posted :)
     
    bobafind, Aug 22, 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 it something that exists within the ad_network_ads.txt file?
     
    digitalpoint, Aug 22, 2004 IP
  3. bobafind

    bobafind Peon

    Messages:
    128
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Is it normal to have 30 or so <ad_break> tags with no ads in them at the end?

    example:
    <ad_break><ad_break><ad_break><ad_break><ad_break><ad_break><ad_break>
    <ad_break><ad_break><ad_break><ad_break><ad_break><ad_break><ad_break>
     
    bobafind, Aug 22, 2004 IP
  4. bobafind

    bobafind Peon

    Messages:
    128
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I've also wondered why I have an empty coop ad slot now and then. This must be why. Should I clear out ad_network_ads.txt?
     
    bobafind, Aug 22, 2004 IP
  5. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #5
    No, you shouldn't have empty ones, but you can clear the file if you want to reset it.
     
    digitalpoint, Aug 22, 2004 IP
  6. bobafind

    bobafind Peon

    Messages:
    128
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Warning: file_get_contents(): URL file-access is disabled in the server configuration in /home/bobafind/www/ad_network.php on line 17

    Warning: file_get_contents(http://ads.digitalpoint.com/network.php?type=link): failed to open stream: no suitable wrapper could be found in /home/bobafind/www/ad_network.php on line 17

    Maybe my server (virtual) disabled it after I had been in the network for a while (I had quite a few ads in the file)
     
    bobafind, Aug 22, 2004 IP
  7. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #7
    Yeah, that looks like a server-side issue when URLs in fopen() being disabled.
     
    digitalpoint, Aug 22, 2004 IP
  8. bobafind

    bobafind Peon

    Messages:
    128
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    My host has a fopen_url setting that is disabled by default. I enabled this and the ads started working again. What I don't understand is: if the setting was off by default, how was I able to pull down any ads in the first place?
     
    bobafind, Aug 22, 2004 IP
  9. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #9
    It was on at some point. Maybe they changed the defaults (it's on in a default install of PHP).
     
    digitalpoint, Aug 23, 2004 IP