SILS: Societa' Italiana Luce di Sincrotrone
Convegno SILS 2004
Camerino 5-8 luglio 2004

Statistics $search_dd"; echo "

back to the main statistics "; //-------------- insert the correct path ---------------------------------- $dati = file ("./external_LOG_MEETIMEX.dat"); $risp = is_file ("./external_LOG_MEETIMEX.dat"); $size = filesize ("./external_LOG_MEETIMEX.dat"); $ncontatti = count ($dati); // reading statistics ARRAY $i=0; $j=0; while ($i < $ncontatti) { $infos = explode ("<>" , $dati[$i]); $giorno = substr ("$infos[0]", 0, 10); $mese = substr ("$infos[0]", 3, 7); $anno = substr ("$infos[0]", 6, 4); if ($giorno == $search_dd) { $j++; $meseanno[$i] = substr ("$infos[0]", 3, 7); $oracon[$i] = substr ("$infos[0]", 11, 5); $ip[$i] = $infos[1]; $host[$i] = $infos[4]; $iphost[$i] = $ip[$i] . "" . $host[$i] . "" ; $pagina[$i] = $infos[2]; $connect[$j] = $oracon[$i] . "  -" . $ip[$i] . "" . $host[$i] . " -  " . $pagina[$i] ; } $i++; } $nconnect = $j ; if ($j == 0) { echo "

the day $search_dd is not present in the database


"; exit; } else { // Contacts during the selected day echo "
"; echo "

Contacts during the day $search_dd: $nconnect

"; echo "

orario di connessione - utente connesso - pagina scaricata
"; $j=1; echo ""; while ($j <= $nconnect ){echo "$connect[$j]
"; $j++;}; echo "

"; ?>
statistics day (dd/mm/yyyy):       

"; echo "

Visited pages during the day $search_dd


"; $paginaX = explode(",", implode(",", $pagina)); $paginaXX = array_count_values($paginaX); arsort ($paginaXX); reset ($paginaXX); list ($chiave, $valore) = each ($paginaXX); $coeff = (250/$valore) ; reset ($paginaXX); while (list ($chiave, $valore) = each ($paginaXX)) {$valore2 = round (($valore*$coeff),0); echo "
   $valore$chiave

" ;}; ?>
statistics day (dd/mm/yyyy):       


"; echo "

IP numbers and DNS hosts connected during the day $search_dd


"; $ipX = explode(",", implode(",", $iphost)); $ipXX = array_count_values($ipX); arsort ($ipXX); reset ($ipXX); list ($chiave, $valore) = each ($ipXX); $coeff = (250/$valore) ; reset ($ipXX); while (list ($chiave, $valore) = each ($ipXX)) { //if ( $valore < 20){break;}; $valore2 = round (($valore*$coeff),0); echo "
   $valore$chiave

" ;}; ?>
statistics day (dd/mm/yyyy):       


Statistics total dimension: "; print($size/1000); echo " Kbytes

"; ?>


StatFast 1.0 by Emiliano Principi.



"; ?>