PDA

View Full Version : How to check amount of players in another server?



Ni3ls
1st January 2016, 14:48
Hi all,

Voron made the nannybot that checks the amount of players in another server and print it in a message. Filthy_freak did the same in his meatbot server. How can I make this? I have no idea where to start

kung foo man
1st January 2016, 17:01
Just parse the result of \xff\xff\xff\xffgetstatus result: http://killtube.org/showthread.php?2147-Receiving-server-info

Easiest way is probably to system("php your_script_to_dump_the_info.php > result.txt"); and read in the result.txt via fopen etc.

voron updated the system() function to directly return the string, so you could merge his changes into your libcod version