setIpAddress($_SERVER['REMOTE_ADDR']); $visitor->setIpAddress(getIP()); $visitor->setUserAgent($_SERVER['HTTP_USER_AGENT']); $visitor->setScreenResolution('1024x768'); if(isset($_COOKIE['__utma'])){ $visitor->fromUtma($_COOKIE['__utma']); } $visitor->fromServerVar($_SERVER); // Assemble Session information // (could also get unserialized from PHP session) $session = new GoogleAnalytics\Session(); // Assemble Page information $page = new GoogleAnalytics\Page('/'.$File); $page->setTitle($File); // Track page view if($track)$tracker->trackPageview($page, $session, $visitor); $File_Name = basename($File); $Root_Path = dirname(dirname(dirname(dirname($_SERVER['PATH_TRANSLATED'])))) . "/"; $Path = "../" . $File; $File_Ext = substr(strrchr($File_Name,"."),1); $Occurence = 0; echo "File: " . $File . "\n"; echo "File_Name: " . $File_Name . "\n"; echo "Root_Path: " . $Root_Path . "\n"; echo "Path: " . $Path . "\n"; echo "File_Ext: " . $File_Ext . "\n"; if(is_file($Path)) { $CleanedFile = str_replace("/","___",$File); $StatPath = "Stats/" . $CleanedFile . ".txt"; echo "Path Exist \n\n"; echo "CleanedFile: " . $CleanedFile . "\n"; echo "StatPath: " . $StatPath . "\n"; }else{ echo "File Does not exist\n"; } // echo "Location = " . $Path.$arg; // header("Content-Type:" . "text/plain"); header("Location:" . $Path.$arg); } function redirection_js($File, $arg){ $FileTracker = $File; if($FileTracker[0]!='/')$FileTracker = '/' . $FileTracker; echo '
';
echo '';
$query = $_SERVER['QUERY_STRING'];
$query = str_replace("htfile", "htfileuntracked", $query);
echo '';
echo 'TEST';
echo "FILE = " . $File .' '; echo " _gaq.push(['_trackPageview', '".$FileTracker."']);"; echo $_SERVER['QUERY_STRING'] . " "; echo $query . " "; echo ' |