From Falcon with Love Code: function bartz_online() { $fs=@fsockopen('server.ip.wehe','serverport',$ERROR_NO,$ERROR_STR,3); $pck=pack("vCi",6,0x0E,-3); fwrite($fs,$pck); $r=fread($fs,73); fclose($fs); $a=unpack("vsize/Cid/iworld/imax/icurrent/iplaying/istore",$r); return $a['current']; } $fp = fopen('full/patch/wher/script/save/file.txt', 'w'); fwrite($fp, bartz_online()); fclose($fp); $fp = fopen('full/patch/wher/script/save/file.txt', 'w'); - Selece pleace wher save file with online counter But if you wont display this on your sete, you need read manual file-get-contents http://en.l2error.com/
Also this function better then usage mssql quere. No load on mssql db every time when someone update your site and if you good understand what are you doing - more safety because no any link to DB from your www. And i want say Thanks to Hoaz for granted server packet
so i was playing around with this and i wanna know if i can get the max user while server is up i did this: Code: printf("ServerName: %s - Current: %d - Store: %d - Max %d\n", $name, $a['playing'], $a['store'], $a['max']); but imax isn't the max number of players that ever connect, it is the socket connections number, so i don't know what is the proper way to get this packet can any one help me out^^ ps. im doing this actualy for fun, i kind need to start learning php anyways