Advertisement
Guest User

Minecraft server checker

a guest
Apr 2nd, 2011
3,243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1. <?php
  2.  
  3.   $server  = "77.251.48.77";
  4.   $port   = "25565";
  5.   $port2   = "8123";
  6.   $timeout = "10";
  7.  
  8.   if ($server and $port and $timeout) {
  9.     $verbinding =  @fsockopen("$server", $port, $errno, $errstr, $timeout);
  10.     $ircbinding =  @fsockopen("$server", $port2, $errno, $errstr, $timeout);
  11.   }
  12.   if($verbinding) {
  13.     echo "<b>Minecraft server is online</b><br>";
  14.   }
  15.   else {
  16.     echo "Minecraft server is offline";
  17.   }
  18.   if($ircbinding) {
  19.     echo "<b>Dynmap Map is online</b>";
  20.   }
  21.   else {
  22.     echo "<b>Dynmap Map is offline</b>";
  23.   }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement