time()-3601))); } $l = json_decode(file_get_contents($p),1); if($l['time']time()]; foreach($x as $z) $l[explode('//',$z->main_url)[1]] = $z->idsite; file_put_contents($p,json_encode($l)); } if(isset($_SERVER['HTTP_ACCEPT'])){ if(stristr($_SERVER['HTTP_ACCEPT'],'text/html') and isset($_SERVER['HTTP_REFERER'])){ if(array_key_exists($_SERVER['SERVER_NAME'],$l)){ $key = $l[$_SERVER['SERVER_NAME']]; }elseif(array_key_exists(join('.',array_slice(explode('.',$_SERVER['SERVER_NAME']),1)),$l)){ $key = $l[join('.',array_slice(explode('.',$_SERVER['SERVER_NAME']),1))]; } if(trim($_SERVER['HTTP_REFERER'])!='' and isset($key)){ include_once 'PiwikTracker.php'; $p = new PiwikTracker($key); } } } $_SERVER['QUERY_STRING'] = $y; ?>