Como ver las estadisticas del Awstats sin dar los datos del cPanel tienen algún script?

Simplemente necesitas subir un archivo con extensión .php con el siguiente código:

<?php

$user = 'usuario';//Usuario de acceso al panel de control
$pass = 'contraseña';//Contraseña de acceso al panel de control
$domain = 'dominio.com';//No incluyas 'http://' ni 'www'

/*
NO NEED TO TOUCH ANYTHING BELOW HERE
*/

//retrieves the file, either .pl or .png
function getFile($fileQuery){
global $user, $pass, $domain;
return file_get_contents("
http://$user:$pass@$domain:2082/".$fileQuery,'r');
}

//it's a .png file...
if(strpos($_SERVER['QUERY_STRING'],'.png')!==false) {
$fileQuery = $_SERVER['QUERY_STRING'];
}
//probably first time to access page...
elseif(empty($_SERVER['QUERY_STRING'])){
$fileQuery = "awstats.pl?config=$domain";
}
//otherwise, all other accesses
else {
$fileQuery = 'awstats.pl?'.$_SERVER['QUERY_STRING'];
}

//now get the file
$file = getFile($fileQuery);

//check again to see if it was a .png file
//if it's not, replace the links
if(strpos($_SERVER['QUERY_STRING'],'.png')===false) {
$file = str_replace('awstats.pl', basename($_SERVER['PHP_SELF']), $file);
$file = str_replace('="/images','="'.basename($_SERVER['PHP_SELF']).'?images',$file);
}
//if it is a png, output appropriate header
else {
header("Content-type: image/png");
}

//output the file
echo $file;
?>

Y lo tendrás de forma pública sin tener que dar los datos de acceso al cPanel

  • 8 Bu dökümanı faydalı bulan kullanıcılar:
Bu cevap yeterince yardımcı oldu mu?

İlgili diğer dökümanlar

Me puede explicar el E-mail correo de bienvenida?

Si, aque las partes mas importantes: Al contratar un Hosting Linux ?con nosotros usted recibir?...

Como puedo bajar mis archivos publicados, del manejador de archivos en cpanel a mi Computador?

Desde el Administrador de Archivos no se puede, deberá hacerlo usando la función de backup, ó un...

Manejadores / Handlers / Controladores de Apache

¿Qué es un controlador / manejador de Apache? Un controlador de Apache es una directiva que le...

Me puede dar un ejemplo del e-mail de bienvenida que recibir? cuando contrate un hosting?

To: cliente@correo.com Subject: Informacion de Su nuevo Hosting Linux American Dominios...

Soportan servlets java, applets y jsp.

Todos los servidores soportan Java applets y jsp,  pero solo algunos tienen soporte para servlets...