Problem with latest ad network update.

Discussion in 'Co-op Advertising Network' started by eeve, Jan 7, 2005.

  1. #1
    The latest ad network update causes the following error to appear every now and then:


    Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/.sites/33/site5/web/includes/db_mysql.php on line 158

    (that's not a path on my server... so it's coming from the network...)

    And an ad that says: ad_network.php file needs updating appears even though I JUST updated... should I purge the txt file?


    :confused:
     
    eeve, Jan 7, 2005 IP
  2. eeve

    eeve Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hmm... removed that text from the ad_network_ads.txt file.
    Will see if it comes back...
     
    eeve, Jan 7, 2005 IP
  3. classifieds

    classifieds Sopchoppy Flash

    Messages:
    825
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    150
    #3
    This happend to me last week.

    Open the ad_network_ads.txt file, search for that string and delete the ad.

    It will take it out of rotation.

    -jay
     
    classifieds, Jan 7, 2005 IP
  4. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #4
    lol. Well, there is a reason it is in there. Going in to your ads file and deleting it is not the solution. I won't hold being a Seminole fan against you ;)
     
    chachi, Jan 7, 2005 IP
  5. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #5
    What is the reason?
     
    yfs1, Jan 7, 2005 IP
  6. classifieds

    classifieds Sopchoppy Flash

    Messages:
    825
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    150
  7. eeve

    eeve Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Treating the symptom not the probem eh?

    Don't worry, the ad_network.php file is updated too.

    lol :D
     
    eeve, Jan 7, 2005 IP
  8. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Guess, that is the reason. lol :)
     
    chachi, Jan 7, 2005 IP
  9. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I guess in Shawns absence just report if it comes back after you delete it. If it comes back then it was meant to be there. If not, its just left over from pre update.
     
    yfs1, Jan 7, 2005 IP
  10. classifieds

    classifieds Sopchoppy Flash

    Messages:
    825
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    150
    #10
    Chachi, You post like a gator?
     
    classifieds, Jan 7, 2005 IP
  11. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #11
    No, like a hurricane on crack. I took a couple of benadryl this morning as my allergies are going nuts today....I just re-read this thread, and I swear it said something else. I think I need a nap. :)
     
    chachi, Jan 7, 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
    My guess is it was left in there for awhile since the old ad_network.php file wasn't expiring old ads. Let me know if it appears with the new code after you have flushed the ad_network_ads.txt file.
     
    digitalpoint, Jan 7, 2005 IP
  13. Foxy

    Foxy Chief Natural Foodie

    Messages:
    1,614
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #13
    err... there seems to be a problem
    look at the text ads
    http://www.timber-top.com/
    and
    http://70.85.48.68/~timberto/

    at first I had just one banner plus text saying it needs to be upgraded on each site intermittently and now I have 5 banners on two sites all the time

    The 70 has its txt flushed and the other not

    The reason for the two sites is the server is in the process of moving
     
    Foxy, Jan 7, 2005 IP
  14. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #14
    Search your servers for ad_network.php files. Your server is mostly up to date (70.85.48.68 seems to be updated), but it's requesting banner ads (not sure if that's what you want or not). Another machine (66.195.127.141) is still requesting old data for that site.
     
    digitalpoint, Jan 7, 2005 IP
  15. Foxy

    Foxy Chief Natural Foodie

    Messages:
    1,614
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Ahhhh....I just went and grabbed the ad_network.php from the master file didn't think that it might be on default as banner.....oops

    I only use text ads and have all the sites to do so at least it was early in the piece - in the meantime the ISP shifts from Florida to Texas .... really helpful today of all days as legal stuff is flying around and emails suddenly become intermittent.

    I'll try and be more observant next time :)

    Thanks Shawn
     
    Foxy, Jan 7, 2005 IP
  16. moskita

    moskita Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Hi!

    My ISP don't permit using file_get_contents function (they say: security reasons)

    They recommend to use curl instead of.

    In "old version" I made some modifications to use curl to open file.
    Everything worked fine.

    Now I did the same (changed file_get_contents function to curl funtion) but I have problem - ad_network_ads.txt is written only one time (one ad link is written to this file).

    I have 5 the same ads on my site in result!


    Here is what I changed:

    original (line 3 to 10):
    
    	if (!function_exists('file_get_contents')) {
    		function file_get_contents($url) {
    			$handle = fopen($url, 'r');
    			$string = fread($handle, 4096000);
    			fclose($handle);
    			return $string;
    		}
    	}
    PHP:
    changed to:

    
    if (!function_exists('url_fopen')) 
    {
    function url_fopen ($url)
    {
           $user_agent = "Mozilla/8.0 (Windows 2008 SP32 + 3patch)";
           $ch = curl_init();
           curl_setopt ($ch, CURLOPT_URL, $url);
           curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent);
           curl_setopt ($ch, CURLOPT_COOKIEJAR, "cookie.txt");
           curl_setopt ($ch, CURLOPT_HEADER, 0);
           curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
           curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
           curl_setopt ($ch, CURLOPT_TIMEOUT, 120);
           $string = curl_exec ($ch);
           curl_close($ch);
           return $string;
    }
    }
    PHP:
    original (line 32):

    $ads = file_get_contents ($ad_file);
    PHP:
    changed to:

    $ads = url_fopen ($ad_file);
    PHP:
    original (line 37):
    $new_ad = file_get_contents ('http://ads.digitalpoint.com/network.php?b=' . $_SERVER['SERVER_NAME']);
    PHP:
    changed to:
    $new_ad = url_fopen ('http://ads.digitalpoint.com/network.php?b=' . $_SERVER['SERVER_NAME']);
    PHP:
    What is wrong?
     
    moskita, Jan 7, 2005 IP
  17. eeve

    eeve Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Update: the original issues that this thread was about... seem to be fixed. Just had to give the txt file a little cleaning.
     
    eeve, Jan 7, 2005 IP