You could use many different techniques for this. One of the most frequently used methods is by using PHP's fsockopen() function to try to connect to the server. This would look something like the following:
Code:
<?php
$GS = fsockopen("www.gameserver.com", 80, $errno, $errstr, 30);
$LS = fsockopen("www.loginServer.com", 80, $errno, $errstr, 30);
if (!$GS) { $GS_stat = 'Offline'; }
else { $GS_stat = 'Online'; }
if (!$LS) { $LS_stat = 'Offline'; }
else { $LS_stat = 'Online'; }
?>
Game Server Status: <?php echo $GS_stat;?> <br>
Login Server Status: <?php echo $LS_stat;?>
Hope this helps.
Bookmarks