unexpected T_VARIABLE in

Discussion in 'Co-op Advertising Network' started by ferret77, Jan 9, 2005.

  1. #1
    second site that has this problem

    is there something in the new code that won't allow you to just install the adds into the .php section of a forum

    I never used the forum setups before, and it worked fine now 3 sites I'm trying to validate the ads won't show up
     
    ferret77, Jan 9, 2005 IP
  2. ferret77

    ferret77 Heretic

    Messages:
    5,276
    Likes Received:
    230
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I have the error here http://forum.weborum.com/lofiversion/index.php

    I also get it on anther site but they guy took it down the coop links becasue he didn't want the error to appear on his site

    I noticed if I comment out this section

    
    	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)];
    		}
    PHP:
    and then just put the "$ad = $ads[rand(1,count($ads) - 1)];" statement in

    it seems to show the ads

    but not on the forum pages, but on other .php pages, onces where it was showing the error before
     
    ferret77, Jan 9, 2005 IP