im trying to put in my website a who all online thingy.
i can list all the players online with a telnet connection but it outputs more info then i need
so i want to strip our everything i don't need and only keep what i do and i have always had problems with striping so i figured i would ask for help.
i am using this.
PHP Code:
fConnect($fp,$Server,$Port,$user,$pass);
fputs ($fp, "who\r");
usleep(125000);
while (!feof($fp))
{
$ret = fgets($fp);
if (ereg("zone", $ret)) {
echo "$ret \n <br>";
}
if (ereg("online", $ret)){
echo "$ret \n";
fclose($fp);
break;
}
}
and it outputs something like this
Code:
[59 Master] Yuari (Iksar) zone: sebilis AccID: 298 AccName: Flora LSID: 110561 Status: 0
1 player online
i want to strip out everything and make a table that says
level name race class zone
and then strips everything and places relevant info under the right catagory..
can someone help me with this?