Making a custom server online banner

Discussion in 'Bukkit Discussion' started by Hockeymikey, Oct 7, 2012.

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

    Hockeymikey

    I want to make a banner that shows my server is online and a few other stats like minestatus.net. The only thing is that I want to customize it to how I like. How would I achieve this?
     
  2. Offline

    Royal_Soda

    You'll need a PHP script which pings your server, then it will echo either an online or offline banner, correspondingly. Hockeymikey
     
  3. Offline

    Hockeymikey

    how do they have the charts like online percent and line graph showing players online in the past?
     
  4. Offline

    Remi1115

    Like Royal says you need to use some sort of server side scripting for the image.
    If the image gets viewed a lot I wouldn't ping the server everytime. Maybe a cronjob on the webserver that pings the MC server every 5-15 minutes and change a '0' or '1' in the database if the server is online or not. The image script could then use that to determine if your Minecraft server is up or not. And if 5 minutes is too long, you could always manually change it to '1'. For example if the server is back online after a crash and you don't want to wait 5 minutes before the image registers it as online.
    I've experimented with getting data from other sites before I present the page to the user with PHP before, and that took at least one second+ to load. With only pinging a server it wouldn't need to take as long as with getting more data, but every 0.1 of a second counts(!) ;) .

    Edit:
    You could store in the database when the Minecraft server was online when it got pinged, with date and everything (UnixTimeStamp prefered, so that maybe a plugin on your Minecraft server could use the data to show the information in-game), and make a graph out of that.
    There are enough free graph maker PHP classes to find on the web which you could use with ease.
     
  5. Offline

    JohnTheRipper

Thread Status:
Not open for further replies.

Share This Page