Username:    Password:        Click Here To Signup     Forgotten Password
Main Menu
Online
Members: 0

Guests: 39

103.204.x.x forum
129.205.x.x forum
151.237.x.x forum
191.101.x.x forum
216.244.x.x forum
37.233.x.x log
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x dilbertplus
46.4.x.x forum
47.89.x.x guestbook
54.36.x.x forum
54.36.x.x lgsl
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x download
54.36.x.x forum
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x dilbertplus
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x user
54.36.x.x forum
54.36.x.x dilbertplus
54.83.x.x forum
91.242.x.x forum

Last Seen

mrstipfan Wed 19:48
Gagi2 Mon 16:30
EFiNST0RM Sun 15:39
85filip58 Sun 12:14
brlight Tue 04:18

Newest Members

Forums
qwas
Tue Jan 08 2013, 02:22PM

Posts: 46
Joined: Sat Sep 08 2012, 05:20PM
Registered Member #7384
Some changes in the method of reading data from a socket. A more correct approach is to read the small portions, waiting until the end of the data. Working code:

$rconPassword = "bla-bla-bla";
        $query        = "\xFF\xFF\xFF\xFF\x00" . $rconPassword . " serverinfo";
        fwrite($lgsl_fp, $query);
        $serverinfo = '';
        while (!feof($lgsl_fp)) { //loop executes until you recived all data and terminated the connection
            $s = fgets($lgsl_fp, 256); //Read data in chunks of 256 bytes, stopping at each line
            if (!trim($s)) { //Interrupt cycle, if we see the empty string
            } else { //otherwise display the received data chunk
                $serverinfo .= $s;
            }
        }


Similarly get "teamstatus"

http://bigshooter.ru
Website
 

Jump:     Back to top


You are not logged in - Click Here To Signup

Username:    Password:   

Mini Buttons

.... © GreyCube.com - Richard Perry - Powered by e107.org