I am not sure if anybody released it before but here youcan get my php script. It is running with KOSP, meaning you need to edit something in config.properties and install KOSP on your Mainserver.exe
*Port in Config.propertiesCode:<?php function Send_KOSP_command($cmd) { $host = "127.0.0.1"; $port = XXXXX; $user = "YYYYY"; $pass = "ZZZZZ"; $fp = @fsockopen($host, $port); if($fp) { // Send login fwrite($fp,"login $user $pass\r"); // Set mode fwrite($fp,"mode web\r"); // Send command fwrite($fp, "$cmd\r"); while(!feof($fp)) $result .= fread ($fp, 1024); fclose($fp); return $result; } return NULL; } $Status = Send_KOSP_command("status"); if($Status) { $PlayerOnline = Send_KOSP_command("player_online"); echo "<div align=center><font color=#ffffff>Player Online : <color='red'>$PlayerOnline</font><br></div>"; } ?>
*Username in Config.properties
*Password in config.properties
Now enjoy.
Kind Regards NarutaruTR



Reply With Quote![[PHP] KOSP Website Player Online Script](http://ragezone.com/hyper728.png)


