Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1. <?php
  2. function GetServerStatus($site, $port)
  3. {
  4. $status = array("OFFLINE", "ONLINE");
  5. $fp = @fsockopen($site, $port, $errno, $errstr, 5);
  6. if (!$fp) {
  7.     return $status[0];
  8. } else
  9.   { return $status[1];}
  10. }
  11.  
  12. echo(GetServerStatus('liquid.stasysgaming.com', 25565));
  13. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement