Suddenly can't validate - here is all the info

Discussion in 'Co-op Advertising Network' started by andheresjohnny, Dec 8, 2006.

  1. #1
    As of early this morning one of my sites stopped validating with the message:

    "Ads not found on http://www.payday-loans-advance.net/"

    Each time I try to manually validate, the screen refreshes immediately and the above message appears again. I've attempted this approximately 15 times throughout the day.

    This is not an issue with other sites.


    What I have done to try to fix the problem

    1. Verify ads are showing on the bottom of the website - they are.

    2. Unbinded site from master account and tried to validate - still got error

    2. Delete the old ad_network_464.php and ad_network_ads_464.txt files from the root. Then, create new ad_network_464.php and ad_network_ads_464.txt files and place them in the root

    3. Verify ads are showing on the bottom of the website after I created the new ad_network_464.php and ad_network_ads_464.txt files - they are.

    4. Manually validate the site once again - I did, and the screen refreshes immediately with same validation error appears as before.


    That is about as far as my knowledge can take me. I would appreciate any suggestions anyone might have. Thanks.



    COOP setup specs

    Website: www.payday-loans-advance.net (php based)
    Coop "Site/Forum URL" field: http://www.payday-loans-advance.net
    Coop "Site Type" field: Other
    Binded to master account: Yes



    
    
    Contents of PHP file ad_network_464.php:
    
    
    
    <?php
    	// Last update:  July 10, 2006 3:10 pm (PST)
    
    	function file_get_contents_an($url) {
    		if (substr ($url, 0, 7) == 'http://') {
    			$url = parse_url ($url);
    			if ($handle = @fsockopen ($url['host'], 80)) {
    				fwrite ($handle, "GET $url[path]?$url[query] HTTP/1.0\r\nHost: $url[host]\r\nConnection: Close\r\n\r\n");
    				while (!feof($handle)) {
    					$string .= @fread($handle, 40960);
    				}
    				$string = explode ("
    ", $string);
    				$string = array_pop ($string);
    			}
    		} else {
    			$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);
    		}
    		mt_srand (make_seed());
    	}
    
    	if (!isset($_SERVER)) $_SERVER = $HTTP_SERVER_VARS;
    
    	$ad_file = 'ad_network_ads_464.txt';
    	for ($i = 0; $i <= 11; $i++) {
    		$path = substr ('../../../../../../../../../../', 0, $i * 3);
    		if (file_exists ($path . $ad_file)) {
    			$ad_file = $path . $ad_file;
    			break;
    		}
    	}
    
    	if (is_writable ($ad_file)) {
    		$ad_network = array();
    		$ads = file_get_contents_an ($ad_file);
    		$ads = explode ('<ad_break>', $ads);
    		$ads_temp = explode ('|', $ads[0]);
    
    		$file = fopen($ad_file, 'r+');
    		if (flock ($file, LOCK_EX|LOCK_NB, $would_block) && !$would_block) {
    			if ((count ($ads) < $ads_temp[4] + 1 && $ads_temp[0] + $ads_temp[6] < time()) || $ads_temp[0] + $ads_temp[5] < time()) {
    				$new_ad = file_get_contents_an ('http://ads.digitalpoint.com/network.php?c=' . $_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_temp[2] . '|' . $ads_param[0]);
    				} else {
    					$ads_param = array_slice ($ads_temp, 3, 6);
    				}
    				$ads_temp[1] = (integer)$ads_temp[1] + 1;
    				if ($ads_temp[1] > $ads_temp[4]) $ads_temp[1] = 1;
    				$ads[0] = time() . '|' . $ads_temp[1] . '|' . gethostbyname('validate.digitalpoint.com') . '|' . implode ('|', $ads_param);
    				if ($new_ad) {
    					$ads[$ads_temp[1]] = $new_ad;
    					if (count ($ads) > $ads_temp[4] + 1) $ads = array_merge ((array)$ads[0], (array)array_slice ($ads, -$ads_temp[4]));
    				}
    				fwrite ($file, implode ('<ad_break>', $ads));
    				ftruncate ($file, ftell($file));
    			}
    			flock ($file, LOCK_UN);
    			fclose ($file);
    		}
    		$ads_x = 0;
    		while (count ($ad_network) < 5) {
    			if (count($ad_network) % 2 == 0 && false) {
    				$ads_next = (hexdec(substr(md5($_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'] . $_SERVER['QUERY_STRING']), 0, 6)) % (count($ads) - 1 - $ads_x)) + 1;
    				$ads_x++;
    			} else {
    				$ads_next = mt_rand(1,count($ads) - 1);
    			}
    			$ad_network[] = $ads[$ads_next];
    		}
    		foreach ($ad_network as $key => $ad) {
    			$split = explode ('<id>', $ad);
    			$ad_ids[] = $split[1];
    			$ad = $split[0];
    			$ads_output = $ads_temp[2] == $_SERVER['REMOTE_ADDR'] || $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR'];
    			if ($ads_output) {
    				$ad_network[$key] = str_replace ('" />', '" class="' . $ads_temp[3] . '" />', $ad);
    			} else {
    				$ad_network[$key] = str_replace ('" />', '">', $ad);
    			}
    		}
    		$ad_network = implode (' - ', $ad_network);
    		if ($ads_temp[7] && ($ads_output || preg_match('#(' . str_replace ('-', '|', $ads_temp[8]) . ')#si', $_SERVER['HTTP_USER_AGENT'])) && !$_SERVER['HTTPS']) $ad_network .= ' <img src="http://ads.digitalpoint.com/t-' . implode ('-', $ad_ids) . '.gif" width="1" height="1">';
    	} else {
    		$ad_network = 'You must set the ' . $ad_file . ' file to be writable (check file name as well).';
    	}
    		if (substr (@$_SERVER['DOCUMENT_NAME'], -6) == '.shtml') {
    		ini_set ('zlib.output_compression', 0);
    		echo $ad_network;
    	}
    
    ?>
    Code (markup):



    COOP code that I have pasted into the footer of my site:
    
    
    <!-- Start of DigitalPoint COOP Code -->
    <?php
    	ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network_464.php');
    	echo $ad_network;
    ?>
    <!-- End of DigitalPoint COOP Code -->
    Code (markup):
     
    andheresjohnny, Dec 8, 2006 IP
  2. spdude

    spdude Guest

    Messages:
    1,315
    Likes Received:
    86
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Exact same issue on three of my sites also.

    Happened to two others a couple of days ago.. and changing API keys fixed the issue... but this time even shuffeling around between various API keys never helped.
     
    spdude, Dec 8, 2006 IP
  3. andheresjohnny

    andheresjohnny Well-Known Member

    Messages:
    964
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    120
    #3
    Really strange. The site still won't validate after 24 hours.

    At least I don't feel "singled-out" since others are experiencing the same problems.

    Thanks for your reply.
     
    andheresjohnny, Dec 9, 2006 IP
  4. andheresjohnny

    andheresjohnny Well-Known Member

    Messages:
    964
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    120
    #4
    I tried removing the Google API key and received the same error message.

    I replaced the Google API key and received the same error message too.

    Strange.
     
    andheresjohnny, Dec 10, 2006 IP
  5. andheresjohnny

    andheresjohnny Well-Known Member

    Messages:
    964
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    120
    #5
    Hmmm .. now other sites are failing under the same scenario as each get auto-validated. So it appears that it's not something unique to my first site.

    As I think of other things to try I'll post the results. Maybe this will help others who are having the same issues.
     
    andheresjohnny, Dec 10, 2006 IP
  6. andheresjohnny

    andheresjohnny Well-Known Member

    Messages:
    964
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    120
    #6
    I don't believe my validation issues has anything to do with my Google API key since this morning I was able to use the Keyword Tracker tool without any problems.

    I know the Keyword Tracker tool uses the Google API key too.

    It does seem like something craps out immediately when trying to manually validate my sites because the screen refreshes almost immediately with the validation error. It's as if I clicked on the browser's "reload" button.

    So the validation script sees something it doesn't like right from the onset? It doesn't appear that there is enough time even for the validation script to connect to the site.

    I'll continue experimenting.
     
    andheresjohnny, Dec 11, 2006 IP
  7. andheresjohnny

    andheresjohnny Well-Known Member

    Messages:
    964
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    120
    #7
    All my sites are once again validating. I don't know what the problem was, but since all my coop sites are hosted by Godaddy .. I'm begining to think the problem was on the Godaddy side.

    Anyway, I no longer need anyone to help me with this issue.
     
    andheresjohnny, Dec 11, 2006 IP