Ad saying "ad_network.php file needs updating"

Discussion in 'Co-op Advertising Network' started by msaad, Jan 8, 2005.

  1. #1
    Hi..
    I just noticed this weird ad on my site... "ad_network.php file needs updating" pointing to digitalpoint's site.

    I was wondering, my php file is actually up to date, but I have updated it just to be sure, anyway this ad still shows.

    Is it just an ad running to get people alerted? Or am I actually doing something wrong?

    Btw, it is a great idea, shawn... No one will miss such a thing! :D
     
    msaad, Jan 8, 2005 IP
  2. xml

    xml Peon

    Messages:
    254
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It is unprofessional having such an advertisement if it is infact an ad.
     
    xml, Jan 8, 2005 IP
  3. Fishing Forum

    Fishing Forum Active Member

    Messages:
    537
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    60
    #3
    ad_network.php file needs updating

    As is says, you ad_network.php file needs updating - login and get the new script and upload it - takes two mins :p

    You should have had an email saying to update it
     
    Fishing Forum, Jan 8, 2005 IP
  4. nevetS

    nevetS Evolving Dragon

    Messages:
    2,544
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    135
  5. catzilla

    catzilla Member

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #5
    I've just updated the ad_network.php file on my site but I'm still getting this message as well.

    Any other ideas?

    Thanks

    Mike
     
    catzilla, Jan 8, 2005 IP
  6. l234244

    l234244 Peon

    Messages:
    1,225
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Delete the add out you ad_network_ads.txt file
     
    l234244, Jan 8, 2005 IP
  7. Tony

    Tony Guest

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I've also just noticed this message but when I log in I don't see anywhere to download the updated file from??

    I also don't recall seeing an email on this subject but with the amount I spam we have to filter it's hardly surprising somethings get lost.

    Tony
     
    Tony, Jan 8, 2005 IP
  8. vinyl

    vinyl Well-Known Member

    Messages:
    302
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    165
    #8
    Tony: login to your account and go to ad setup link.

    I also get this odd message AFTER I updated PHP code + blanked ad_network_ads.txt file -- this is how that .txt looks now (after couple executions):

     
    vinyl, Jan 8, 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
    If anyone wants me to check it on this end, I'll need the site URL.
     
    digitalpoint, Jan 8, 2005 IP
  10. vinyl

    vinyl Well-Known Member

    Messages:
    302
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    165
    #10
    Here you go - http://www.freelance-help.com/ + http://www.freelance-help.com/ad_network_ads.txt

    p.s. i dont use ad_network.php, i include whole code in footer, which worked perfectly till now:

    <?php
    
    	if (!function_exists('file_get_contents')) {
    		function file_get_contents($url) {
    			$handle = fopen($url, 'r');
    			$string = fread($handle, 4096000);
    			fclose($handle);
    			return $string;
    		}
    	}
    	
    	if (!function_exists('make_seed')) {
    		function make_seed() {
    			list($usec, $sec) = explode(' ', microtime());
    			return (float) $sec + ((float) $usec * 100000);
    		}
    		srand (make_seed());
    	}
    
    	if (!isset($_SERVER)) $_SERVER = $HTTP_SERVER_VARS;
    
    	$ad_file = '/home/kerber/public_html/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);
    		$ads_temp = explode ('|', $ads[0]);
    
    		if ((count ($ads) < $ads_temp[3] + 1 && $ads_temp[0] + $ads_temp[5] < time()) || $ads_temp[0] + $ads_temp[4] < time()) {
    			$new_ad = file_get_contents ('http://ads.digitalpoint.com/network.php?b=' . $_SERVER['SERVER_NAME'] . '&type=link');
    			if ($new_ad) {
    				$ads_param = explode ('<ad_param>' , $new_ad);
    				$new_ad = $ads_param[1];
    				unset ($ads_param[1]);
    				$ads_temp = explode ('|', $ads_temp[0] . '|' . $ads_temp[1] . '|' . $ads_param[0]);
    			} else {
    				$ads_param = array_slice ($ads_temp, 2, 4);
    			}
    			$ads[0] = time() . '|' . gethostbyname('validate.digitalpoint.com') . '|' . implode ('|', $ads_param);
    			if ($new_ad) {
    				$ads[] = $new_ad;
    				if (count ($ads) > $ads_temp[3] + 1) $ads = array_merge ($ads[0], array_slice ($ads, -$ads_temp[3]));
    			}
    			$file = fopen($ad_file, 'r+');
    			if (flock ($file, LOCK_EX)) {
    				fwrite ($file, implode ('<ad_break>', $ads));
    				ftruncate ($file, ftell($file));
    				flock ($file, LOCK_UN);
    			}
    			fclose ($file);
    			$ad = $new_ad;
    
    		} else {
    			$ad = $ads[rand(1,count($ads) - 1)];
    		}
    		$ad_network[] = $ad;
    		while (count ($ad_network) < 5) {
    			$ad_network[] = $ads[rand(1,count($ads) - 1)];
    		}
    		foreach ($ad_network as $key => $ad) {
    			if ($ads_temp[1] == $_SERVER['REMOTE_ADDR'] || $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR']) {
    				$ad_network[$key] = str_replace ('" />', '" class="' . $ads_temp[2] . '" />', $ad);
    			} else {
    				$ad_network[$key] = str_replace ('" />', '">', $ad);
    			}
    		}
    	} 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 end ($ad_network);
    	}
    
    echo $ad_network[0];
    ?>
     | 
     <?php
    
    	if (!function_exists('file_get_contents')) {
    		function file_get_contents($url) {
    			$handle = fopen($url, 'r');
    			$string = fread($handle, 4096000);
    			fclose($handle);
    			return $string;
    		}
    	}
    	
    	if (!function_exists('make_seed')) {
    		function make_seed() {
    			list($usec, $sec) = explode(' ', microtime());
    			return (float) $sec + ((float) $usec * 100000);
    		}
    		srand (make_seed());
    	}
    
    	if (!isset($_SERVER)) $_SERVER = $HTTP_SERVER_VARS;
    
    	$ad_file = '/home/kerber/public_html/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);
    		$ads_temp = explode ('|', $ads[0]);
    
    		if ((count ($ads) < $ads_temp[3] + 1 && $ads_temp[0] + $ads_temp[5] < time()) || $ads_temp[0] + $ads_temp[4] < time()) {
    			$new_ad = file_get_contents ('http://ads.digitalpoint.com/network.php?b=' . $_SERVER['SERVER_NAME'] . '&type=link');
    			if ($new_ad) {
    				$ads_param = explode ('<ad_param>' , $new_ad);
    				$new_ad = $ads_param[1];
    				unset ($ads_param[1]);
    				$ads_temp = explode ('|', $ads_temp[0] . '|' . $ads_temp[1] . '|' . $ads_param[0]);
    			} else {
    				$ads_param = array_slice ($ads_temp, 2, 4);
    			}
    			$ads[0] = time() . '|' . gethostbyname('validate.digitalpoint.com') . '|' . implode ('|', $ads_param);
    			if ($new_ad) {
    				$ads[] = $new_ad;
    				if (count ($ads) > $ads_temp[3] + 1) $ads = array_merge ($ads[0], array_slice ($ads, -$ads_temp[3]));
    			}
    			$file = fopen($ad_file, 'r+');
    			if (flock ($file, LOCK_EX)) {
    				fwrite ($file, implode ('<ad_break>', $ads));
    				ftruncate ($file, ftell($file));
    				flock ($file, LOCK_UN);
    			}
    			fclose ($file);
    			$ad = $new_ad;
    
    		} else {
    			$ad = $ads[rand(1,count($ads) - 1)];
    		}
    		$ad_network[] = $ad;
    		while (count ($ad_network) < 5) {
    			$ad_network[] = $ads[rand(1,count($ads) - 1)];
    		}
    		foreach ($ad_network as $key => $ad) {
    			if ($ads_temp[1] == $_SERVER['REMOTE_ADDR'] || $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR']) {
    				$ad_network[$key] = str_replace ('" />', '" class="' . $ads_temp[2] . '" />', $ad);
    			} else {
    				$ad_network[$key] = str_replace ('" />', '">', $ad);
    			}
    		}
    	} 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 end ($ad_network);
    	}
    
    echo $ad_network[1];
    ?> 
     | 
     <?php
    
    	if (!function_exists('file_get_contents')) {
    		function file_get_contents($url) {
    			$handle = fopen($url, 'r');
    			$string = fread($handle, 4096000);
    			fclose($handle);
    			return $string;
    		}
    	}
    	
    	if (!function_exists('make_seed')) {
    		function make_seed() {
    			list($usec, $sec) = explode(' ', microtime());
    			return (float) $sec + ((float) $usec * 100000);
    		}
    		srand (make_seed());
    	}
    
    	if (!isset($_SERVER)) $_SERVER = $HTTP_SERVER_VARS;
    
    	$ad_file = '/home/kerber/public_html/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);
    		$ads_temp = explode ('|', $ads[0]);
    
    		if ((count ($ads) < $ads_temp[3] + 1 && $ads_temp[0] + $ads_temp[5] < time()) || $ads_temp[0] + $ads_temp[4] < time()) {
    			$new_ad = file_get_contents ('http://ads.digitalpoint.com/network.php?b=' . $_SERVER['SERVER_NAME'] . '&type=link');
    			if ($new_ad) {
    				$ads_param = explode ('<ad_param>' , $new_ad);
    				$new_ad = $ads_param[1];
    				unset ($ads_param[1]);
    				$ads_temp = explode ('|', $ads_temp[0] . '|' . $ads_temp[1] . '|' . $ads_param[0]);
    			} else {
    				$ads_param = array_slice ($ads_temp, 2, 4);
    			}
    			$ads[0] = time() . '|' . gethostbyname('validate.digitalpoint.com') . '|' . implode ('|', $ads_param);
    			if ($new_ad) {
    				$ads[] = $new_ad;
    				if (count ($ads) > $ads_temp[3] + 1) $ads = array_merge ($ads[0], array_slice ($ads, -$ads_temp[3]));
    			}
    			$file = fopen($ad_file, 'r+');
    			if (flock ($file, LOCK_EX)) {
    				fwrite ($file, implode ('<ad_break>', $ads));
    				ftruncate ($file, ftell($file));
    				flock ($file, LOCK_UN);
    			}
    			fclose ($file);
    			$ad = $new_ad;
    
    		} else {
    			$ad = $ads[rand(1,count($ads) - 1)];
    		}
    		$ad_network[] = $ad;
    		while (count ($ad_network) < 5) {
    			$ad_network[] = $ads[rand(1,count($ads) - 1)];
    		}
    		foreach ($ad_network as $key => $ad) {
    			if ($ads_temp[1] == $_SERVER['REMOTE_ADDR'] || $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR']) {
    				$ad_network[$key] = str_replace ('" />', '" class="' . $ads_temp[2] . '" />', $ad);
    			} else {
    				$ad_network[$key] = str_replace ('" />', '">', $ad);
    			}
    		}
    	} 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 end ($ad_network);
    	}
    
    echo $ad_network[2];
    ?>
    
    PHP:
     
    vinyl, Jan 8, 2005 IP
  11. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #11
    I would search the machine for ad_network.php... it looks like you might have an old one on there somewhere. Make sure you are only using one instance per server and you should be fine.
     
    digitalpoint, Jan 8, 2005 IP
  12. vinyl

    vinyl Well-Known Member

    Messages:
    302
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    165
    #12
    kill me if i can find it (again, note that i dont have ad_network.php, i have code which i add manually to couple footers/templates) - is there a chance to identify specific file which causes this error? i rechecked all code again and i cant find any old version of coop network code.
     
    vinyl, Jan 8, 2005 IP
  13. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #13
    No, I can't tell you what the specific name of a file is that is making the call. You may need to search the contents of your actual files for ads.digitalpoint.com or something if you cannot locate it. Either way, there should be only one instance of the ad_network.php code (in your case there are at least 2).
     
    digitalpoint, Jan 8, 2005 IP
  14. Spacen

    Spacen Peon

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #14
    I was having this problem too. I saw the ad saying I needed to update the file. I did the update and saw the ad was still in rotation. I figured it would eventually work itself out of the rotation so I left it for a few days. Three days later the ad was still in rotation. I had to clear the text file and it doesn't appear to be coming back now.
     
    Spacen, Jan 9, 2005 IP
  15. joeychgo

    joeychgo Notable Member

    Messages:
    3,368
    Likes Received:
    321
    Best Answers:
    0
    Trophy Points:
    255
    #15
    why do it that way?
     
    joeychgo, Jan 9, 2005 IP