Okay, okay :oops:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="expire" content="1 Days">
<TITLE>FTP-Connections</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF" leftmargin="0px" topMargin="0px" marginheight="0px" marginwidth="0px" onLoad="window.defaultStatus='';">
<TABLE border="0" align="center" width="100%" cellspacing="0" cellpadding="3">
<TR>
<TD colspan="2" align="left">
<?php
$tempfile = "/tmp/ftp.online";
$program = "/usr/local/bin/ftpwho -v";
$refresh = "2"; //Sekunden
switch($show)
{
default:
{
switch($subaction)
{
default:
{
echo "<FONT face=\"arial\" size=\"+2\">FTP-Connections...</FONT>\n";
$command = shell_exec($program.' > '.$tempfile);
$handle = fopen ("$tempfile", "r");
if ($handle)
{
echo "<font size=-2 face=verdana><UL>";
while (!feof ($handle))
{
$buffer = fgets($handle, 4096);
$buffer = str_replace("client", "<HR>Client",strtolower($buffer));
$buffer = str_replace("retr", "<font color=red><b>retr</b></font>",strtolower($buffer));
$buffer = str_replace("idle", "<font color=green><b>idle</b></font>",strtolower($buffer));
$buffer = str_replace("stor", "<font color=red><b>stor</b></font>",strtolower($buffer));
if (stristr($buffer,"stor") || stristr($buffer,"retr") || stristr($buffer,"idle"))
{
echo "<b><nobr>".$buffer."</nobr></b><BR>";
}
elseif (stristr($buffer,"users"))
{
echo "<nobr><font color=\"#4040ff\"><B>".$buffer."</B></font></nobr>";
}
else
{
echo "<nobr><font color=\"#404040\">".$buffer."</font></nobr>";
}
}
fclose ($handle);
unlink($tempfile);
echo '<META HTTP-EQUIV=Refresh CONTENT="'.$refresh.'; URL=".$_SERVER["PHP_SELF"].">';
}
}
}
break;
}
}
?>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>