diff --git a/index.php b/index.php index db771a3..4f82e09 100755 --- a/index.php +++ b/index.php @@ -49,6 +49,8 @@
+
+
title
@@ -95,6 +97,23 @@ }); + + diff --git a/online.dat b/online.dat new file mode 100644 index 0000000..e69de29 diff --git a/online.php b/online.php new file mode 100644 index 0000000..0840ce8 --- /dev/null +++ b/online.php @@ -0,0 +1,80 @@ +$str) + { + if($str=="$user::$time\r\n") + { + $ok=$i; + break; + } + } + foreach($online_array as $j=>$str) + { + if($ok==$j) { $online_array[$ok]="$user::$time\r\n"; break;} + } + endif; + + $writedata=fopen($data,"w") or die("Не могу открыть файл $data"); + flock($writedata,2); + if($online_array=="") $online_array[]="$user::$time\r\n"; + foreach($online_array as $str) + fputs($writedata,"$str"); + flock($writedata,3); + fclose($writedata); + + $readdata=fopen($data,"r") or die("Не могу открыть файл $data"); + $data_array=file($data); + fclose($readdata); + $online=count($data_array); + + echo "Listeners : $online"; +?>