Here, I fixed it up a bit.Code:<?php include("top.php"); $worldport = 1099; //Port used by your worldserver $loginport = 8484; //Port used by your loginserver $channelport = 7575; //Starting port used by your channels $channels = 2; //how many channels $ip = "127.0.0.1"; $servername = "ServerMS"; echo "Use this page to see if the login server is online, so you can log in to ".$servername.", and see if your favorite channels are online, or wait until they are.<br />"; //world if($worldport != "") { if (!$sock = @fsockopen($ip, $worldport, $num, $error, 5)) { echo '<B>World Server:<FONT COLOR=red> Offline</b></FONT>'; } else { echo '<B>World Server:<FONT COLOR=green> Online</b></FONT>'; fclose($sock); } } else { echo "The World Server's port is incorrectly configured, so this will stay offline, however if the channels are online, this server is online too because the channel server requires this."; } echo "<br />"; //login if (!$sock = @fsockopen($ip, $loginport, $num, $error, 5)) { echo '<B>Login Server:<FONT COLOR=red> Offline</b></FONT>'; } else { echo '<B>Login Server:<FONT COLOR=green> Online</b></FONT>'; fclose($sock); } echo "<br />"; //channels for($i = 7575; $i < $channels + 7575; $i++) { if (!$sock = @fsockopen($ip, $i, $num, $error, 5)) { echo '<B>Channel '.($i - 7574).':<FONT COLOR=red> Offline</b></FONT>'; } else { echo '<B>Channel '.($i - 7574).':<FONT COLOR=green> Online</b></FONT>'; fclose($sock); } echo "<br />"; } echo "<br>By MyEnterprise"; include("end.php"); ?>



Reply With Quote

