Jump to content

Recommended Posts

Posted

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

Posted

:angry: Welcome to the Family Noiz :yes:

 

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 :D

Posted
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;
}
/* } */
?>

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...