Also hab mir jetzt erst mal nen neues Script besorgt macht zwar genau das gleiche wie das alte aber ich glaub das ist nicht so schlecht wie das alte (hoffe ich):
$f_online = "besucher.txt"; //hier werden die Daten gespeichert
if( file_exists($f_online) )
{
$logoutTime = 300;
$IP = $REMOTE_ADDR;
$users = 0;
$res = "";
$fp = fopen($f_online,"r");
$t = time();
$content = fread($fp,filesize($f_online));
fclose($fp);
$lineas = split("
",$content);
for( $i = 0; $i < count($lineas); $i++ )
{
$datos = split(":",$lineas[$i]);
$n = $t - $logoutTime;
if ($datos[0] != $IP && $datos[1] > ($n))
{
$res .= "$datos[0]:$datos[1]
";
$usuarios++;
}
}
$res .= "$IP:$t
";
$users++;
$fp = fopen($f_online,"w");
fwrite ($fp,$res);
fclose($fp);
}
$fp2=fopen("test.txt","w");
fwrite($fp2,$users);
fclose($fp2);
echo $users." User online"; // User online ausgeben
?>
~~~problem ich muß halt noch das mit den cronjobs da reinbekommen damit da nit immer steht 1 User Online