Server info displayed on website - better way?

Discussion in 'Plugin Development' started by MCMastery, Jun 23, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    MCMastery

    I got my plugin to display server status on my website, but I have a feeling that the way I am doing it is not really great.

    I upload a file with the server's current info (numPlayers, maxPlayers, etc.) to my website from my plugin, whenever any of the info changes (like PlayerJoinEvent, and PlayerQuitEvent).
    When the website loads, I AJAX a PHP script which reads this file. The PHP file outputs the displayed server info, which the HTML file reads...

    Is there a better way of doing this, or is this "the right way"?

    EDIT: I've looked at other PHP examples that simply trigger the ServerListPing event and get the info from that. However, I want info that event can't provide (like exactly who is on the server).
     
  2. Offline

    timtower Administrator Administrator Moderator

    @MCMastery There are many ways to do this.
    • Socket on the game server
    • Database
    • FTP
    • Webserver on the game server(pretty much same as first point)
     
    MadMaxCookie likes this.
Thread Status:
Not open for further replies.

Share This Page