maza piebilde, un tad jau viss strādā
function playerlog($message)
{
global $username;
$file='./log_files/'.$username.'.php';
if (!file_exists($file))
{
$fh=fopen($file,'w');
fwrite($fh,'<?php exit; ?>'."\n")
fclose($fh);
}
$log=fopen($file,'a');
fwrite($log, date('y-m-d H:i:s').' '.$message."\n");
fclose($log);
}
//lasīšana
$fh=fopen('./log_files/'.$_GET['username'].'.php','r');
fgets($fh,4096); //izlaižam pirmo rindu
while($line=fgets($fh,4096))
echo '<br />'.$line;
fclose($fh);