Ver Mensaje Individual
  #18 (permalink)  
Antiguo 01/06/2005, 12:05
liberfg
 
Fecha de Ingreso: septiembre-2004
Ubicación: Montevideo
Mensajes: 346
Antigüedad: 19 años, 7 meses
Puntos: 0
Hola a Todos, encontre lo que bucaba:

<?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;
?>

Estaba posteado en otro foro, lo encontre usando google.

Saludos,

Liber
__________________
Liber