SHARE
TWEET

Untitled

a guest Jan 14th, 2016 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $ip = '80.72.37.12';
  4. $port = 23074;
  5.  
  6. $fp = fsockopen($ip, $port + 10, $errno, $errstr, 30);
  7. if (!$fp) {
  8.     echo "$errstr ($errno)";
  9. } else {
  10.     fwrite($fp, "STARTFILES\r\nlogs/gamestat.txt\r\nENDFILES\r\n");
  11.     while (!feof($fp)) {
  12.         $data = fgets($fp, 128);
  13.         if (strpos($data, 'Players: ') !== false) {
  14.             $players = explode(': ', $data);
  15.             $players = $players['1'];
  16.         }
  17.     }
  18.     fclose($fp);
  19. }
  20. echo $players;
  21. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top