Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ip = '127.0.0.1';
- $port = '7777';
- $fp = fsockopen($ip, $port, $errno, $errstr, 1);
- $pck = pack("vCi", 8, 0, -3);
- fwrite($fp, $pck);
- $start = time();
- socket_set_timeout($fp, 1);
- $st = socket_get_status($fp);
- $st = $st["unread_bytes"];
- $st = fread($fp, 73);;
- if ($st) {
- //$st .= fread($fp, $st);
- fclose($fp);
- $a = unpack("vsize/Cid/iworld/imax/icurrent/iplaying/istore", $st);
- $reply = $a;
- } else {
- $reply = 'offline';
- }
- echo $reply;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement