04-18-2016, 11:48 PM
How to put players online to my site monitoring from web admin? "Players online: 12"
Players Online in web site.
|
04-18-2016, 11:48 PM
How to put players online to my site monitoring from web admin? "Players online: 12"
04-19-2016, 12:12 AM
I'm not sure what you want. The "Players online: (number)" shows how many players are on the server at the moment.
Thanks given by: Francisdaumb
04-19-2016, 03:40 AM
I think boo wants to have the number show up on the main website not the webadmin?
Thanks given by: PCPlayerLV
04-19-2016, 05:43 AM
I made that some time ago for a website, although for spigot, but it's just an implementation of the minecraft ping protocol. I used this library (ping "version") https://github.com/xPaw/PHP-Minecraft-Query. You can aquire the online players with $Query->Query()["players"]["online"] (i saved the result of $Query->Query() in the variable $result, then closed the connection. After that checked if ($result) which checks if the host is online (otherwise result would he empty I think) and then accessed$result["players"]["online"]
I wish you good luck!
04-25-2016, 08:19 AM
That library should work with cuberite, as we also support the ping protocol.
11-02-2016, 08:31 PM
Thanks for sharin' guys.
Thanks given by: PCPlayerLV
|
« Next Oldest | Next Newest »
|