<?php Error_Reporting(E_ALL & ~E_NOTICE); $lines=file("data/who.dat"); $count=count($lines); $time=time(); $self = $_SERVER['SCRIPT_NAME']; $ttt="$log|$self|$time"; $fp = @fopen("data/who.dat","a+"); flock ($fp,LOCK_EX); @fputs($fp,"$ttt\r\n"); fflush ($fp); flock ($fp,LOCK_UN); @fclose($fp); $file=file("data/who.dat"); $i = count($file); if ($i>=$who_lastusers) { $fp=fopen("data/who.dat","w"); flock ($fp,LOCK_EX); unset($file[0]); fputs($fp, implode("",$file)); flock ($fp,LOCK_UN); fclose($fp);} ?>