How to validate account?

Discussion in 'Co-op Advertising Network' started by CommunityZ, Jan 6, 2005.

  1. #1
    How to validate account?
    My url is correct.
    username : CommunityZ
     
    CommunityZ, Jan 6, 2005 IP
  2. swaz

    swaz Active Member

    Messages:
    540
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    90
    #2
    swaz, Jan 6, 2005 IP
  3. CommunityZ

    CommunityZ Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I haven't do the setup yet sorry :)
     
    CommunityZ, Jan 6, 2005 IP
  4. CommunityZ

    CommunityZ Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ok validated

    Here my code
    include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK' => $ad_network[0]));
    $template->assign_vars(array('AD_NETWORK' => $ad_network[1]));
    $template->assign_vars(array('AD_NETWORK' => $ad_network[2]));
    $template->assign_vars(array('AD_NETWORK' => $ad_network[3]));
    $template->assign_vars(array('AD_NETWORK' => $ad_network[4]));
    $template->pparse('overall_footer');

    ---------------------------

    <p align="center">{AD_NETWORK} {AD_NETWORK1} {AD_NETWORK2} {AD_NETWORK3} {AD_NETWORK4}</p>

    But why the ad at the bottom of my site only show one ?
    http://www.malaysia-forum.com
     
    CommunityZ, Jan 8, 2005 IP
  5. CommunityZ

    CommunityZ Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    <?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 = '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);
    	}
    
    ?>
    Code (markup):
     
    CommunityZ, Jan 8, 2005 IP
  6. CommunityZ

    CommunityZ Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    include ($phpbb_root_path . 'ad_network.php');
    $template->assign_vars(array('AD_NETWORK' => $ad_network[0]));
    $template->assign_vars(array('AD_NETWORK1' => $ad_network[1]));
    $template->assign_vars(array('AD_NETWORK2' => $ad_network[2]));
    $template->assign_vars(array('AD_NETWORK3' => $ad_network[3]));
    $template->assign_vars(array('AD_NETWORK4' => $ad_network[4]));
    $template->pparse('overall_footer');

    Found my error! Thank you!
     
    CommunityZ, Jan 8, 2005 IP
  7. CommunityZ

    CommunityZ Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    How to count weight bonus ? What is the use of it ?
    What is the use of bind account ?
    Can i put all the link of my accounts to one URL ?
    A account(ww.A.com) to site.com(text link)
    B account(ww.B.com) to site.com(text link)
    C account(ww.C.com) to site.com(text link) too ?
     
    CommunityZ, Jan 8, 2005 IP