noiz Posted January 23, 2005 Posted January 23, 2005 so i just switched to tch and on my last host i had bbclone installed that tracked who visited my site and also the users could see the stats too. since i already have awstats i was wondering if there is a way to allow others to see the stats for my site? or what would probably be better is if there was a way to have awstats export some of the stats to an html file that the users could view. -noiz Quote
TCH-Don Posted January 23, 2005 Posted January 23, 2005 Welcome to the Family Noiz and your new home! I think the amount of info from your awstats might be too much to display to visitors. I would think something from hotscripts might work for you. And I am sure some of your family here may have ideas for you. We really are like family here. So if you need anything, just ask your new family! We love to help Quote
TCH-Thomas Posted January 23, 2005 Posted January 23, 2005 Welcome to your extended family Please see this page since I think it is what you want to do. Quote
TCH-Bruce Posted January 23, 2005 Posted January 23, 2005 Welcome to the family and forums Noiz! And your new home. Quote
noiz Posted January 23, 2005 Author Posted January 23, 2005 ok, thats pretty much what i wanted, but is there a way to make it so people dont have to login? -noiz Quote
TCH-Dick Posted January 23, 2005 Posted January 23, 2005 ok, thats pretty much what i wanted, but is there a way to make it so people dont have to login? -noiz Replace index.php with this ><? require_once("config.php"); /* if (!isset($PHP_AUTH_USER)) { header('WWW-Authenticate: Basic realm="Site Statistics"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else if (isset($PHP_AUTH_USER)) { if (($PHP_AUTH_USER != $username) || ($PHP_AUTH_PW != $password)) { header('WWW-Authenticate: Basic realm="Site Statistics"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else { */ if($QUERY_STRING == ""){$query = "config=$site";}else{$query=$QUERY_STRING;}; $Previous = false; if(isset($_POST)) { foreach($_POST as $key => $value) { if($Previous) { $POSTED .= "&"; } $POSTED = "$key=$value"; $Previous = true; } /* } */ $Curl = curl_init("http://$cpnlusername:$cpnlpassword@$site:2082/awstats.pl?$query"); if(isset($_POST)) { curl_setopt($Curl, CURLOPT_POST, TRUE); curl_setopt($Curl, CURLOPT_POSTFIELDS, $POSTED); } curl_setopt($Curl, CURLOPT_RETURNTRANSFER, 1); $results = curl_exec($Curl); for ($i = 0; $i < count($return_message_array); $i++) { $results = $results.$return_message_array[$i]; } if($query == "config=$site"){$results = str_replace("src=\"", "src=\"?", $results);} if($framename==index){$results = str_replace("src=\"", "src=\"index.php?", $results);} $results = str_replace("action=\"", "action=\"index.php?", $results); $results = str_replace("href=\"", "href=\"?", $results); $results = str_replace("href=\"?http://", "href=\"http://", $results); $results = str_replace("awstats.pl?", "", $results); echo $results; } /* } */ ?> Quote
noiz Posted January 23, 2005 Author Posted January 23, 2005 ok, thats what i wanted to do, but now there is one problem i have. i want the stats to be a subdomain for my site, and when i do have it like that all of the images for the awstats page dont load, how would i fix this? -noiz Quote
TCH-Dick Posted January 23, 2005 Posted January 23, 2005 Try creating an images folder in the subdomain directory and upload the images there. Quote
noiz Posted January 23, 2005 Author Posted January 23, 2005 thanks, now everything works the way i want it to! -noiz Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.