Gestion Labo © $time_buffer+$interval) { // If ip address exists & interval is reached, update time access $count++; fseek($fd,$ptr); fputs($fd,sprintf("%04d\t%s",$time,$ip)); fseek($fd,0); fputs($fd,sprintf("%d\t%s\t%d",$count, $date, $interval)); break; } } $ptr=ftell($fd); } if(!$ip_exist) { // If ip address not exists, create entry $count++; fseek($fd,0,SEEK_END); fputs($fd,sprintf("%04d\t%s\n",$time,$ip)); fseek($fd,0); fputs($fd,sprintf("%d\t%s\t%d",$count, $date, $interval)); } } else { // The day has changed, recreate the file in saving count value // save also ip address list $fdbis = fopen($_SERVER['DOCUMENT_ROOT']."/trtphp/compteur/infos/totalcount.txt","a"); while ($param = fscanf($fd,"%d\t%s\n")) { list ($time_buffer,$ip_buffer) = $param ; { $hour=$time_buffer/60; $minute=$time_buffer%60; fputs($fdbis,sprintf("%s\t%02d:%02d\t%s\n", $date,$hour,$minute,$ip_buffer)); } } fclose($fdbis); fclose($fd); $count++; $fd = fopen($_SERVER['DOCUMENT_ROOT']."/trtphp/compteur/infos/compteur.txt","w"); fputs($fd,sprintf("%d\t%s\t%d\n",$count,date("d/m/y"), $interval)); fputs($fd,sprintf("%04d\t%s\n",$time,$ip)); fclose($fd); } ?>


Aujourd'hui
27/05/2022








Icônes / logos / images du site Gestion Labo©
Lien à placer sur votre bureau (raccourci internet) :
Logos du logiciel :
Conseil navigation