Jump to content

[REQUEST] Code which shows server status on website


Recommended Posts

Hey people. I've got a request to somebody who knows php, css, etc.

Can someone make me a small script which shows my server's status in the center of my website's home page right above the shoutbox? (http://www.classicracing.tk)

If the server is online it should show in green text "Online curPlayers/maxPlayers" and when it's offline to show a text "Offline 0/maxPlayers". 

I searched the Internet and found just one php script from 2011 but i think that would show it on a completely new page, which isn't what I'm looking for. 

I'd be thankful if you tell how to position it at the center since i don't know even that. I'm a complete noob in website stuff but managed to create my forum thanks to the awesome SMF and all it's easy to use modifications. 

Link to comment

If you want to produce your own one, I suggest creating a MySQL database, with rows actively being created and destroyed to reflect the scoreboard, and then using PHP to access that database and count the number of players, optionally displaying their names in a table on the site.

Could you perhaps also share the link to that "old 2011" code you found? It might make the work easier if someone can just edit that instead of writing from scratch.

Edited by Investor
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...