Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ip = '80.72.37.12';
- $port = 23074;
- $fp = fsockopen($ip, $port + 10, $errno, $errstr, 30);
- if (!$fp) {
- echo "$errstr ($errno)";
- } else {
- fwrite($fp, "STARTFILES\r\nlogs/gamestat.txt\r\nENDFILES\r\n");
- while (!feof($fp)) {
- $data = fgets($fp, 128);
- if (strpos($data, 'Players: ') !== false) {
- $players = explode(': ', $data);
- $players = $players['1'];
- }
- }
- fclose($fp);
- }
- echo $players;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement