$path="countvisit.php"; $count=1; $flag=false; while($count<4) { if(file_exists($path)) { $flag=true; break; } $path="../".$path; $count++; } if($flag) { require_once $path; //countVisit(getenv('REMOTE_ADDR'),getenv ("HTTP_REFERER"),$_SERVER[REQUEST_URI],getenv ("HTTP_USER_AGENT")); $page=findCountryHomePageByHtm(getenv('REMOTE_ADDR')); if($page!="") header("Location: ".$page); } ?>