Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ip = "77.243.109.18";
- $port = "28960";
- $online_players = file_get_contents("http://GothicMP.org/servers_addon.php?action=players&ip=".$ip."&port=".$port); //returns number or nil
- $max_players = file_get_contents("http://GothicMP.org/servers_addon.php?action=maxplayers&ip=".$ip."&port=".$port); //returns number or nil
- $bots_in_game = file_get_contents("http://GothicMP.org/servers_addon.php?action=bots&ip=".$ip."&port=".$port); //returns number or nil
- $max_bots = file_get_contents("http://GothicMP.org/servers_addon.php?action=maxbots&ip=".$ip."&port=".$port); //retruns number or nil
- $status = file_get_contents("http://GothicMP.org/servers_addon.php?action=status&ip=".$ip."&port=".$port); //returns "Online" or "Offline"
- echo "<strong>";
- if($status == "Online")
- echo "Status: <font color=green>".$status."</font><br />";
- else
- echo "Status: <font color=red>".$status."</font><br />";
- echo "Игроков: ".$online_players."/".$max_players."<br />";
- echo "Ботов: ".$bots_in_game."/".$max_bots."";
- echo "</strong>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement