Best Way to Make a Game Status Indicator

Hello everyone! I am new here and I was wondering which method would be best to make an indicator for the status of a game that I own and have hosted elsewhere:

  1. modify the game server so it can serve a small webpage indicating its status and place an iframe on the sidebar of my main site
  2. use AJAX to fetch the status of the game server asynchronously and use Javascript to update a status indicator on the page
  3. use PHP to check the status of the game server and generate the correct status indicator

I already know that I cannot have an app connect to my main site InfinityFree does not allow that. But surely one of the above methods is ok to use right? And if so, which one is best?

Hello! May i know what “status” will you show?

Is it sensitive data or a public data?

Public data like whether the server is online or offline, and perhaps how many players are online at the time. It doesn’t have to be realtime though. Just refreshed when the page is refreshed by the user.

I suggest 1 & 3. I dont really recommend AJAX (for some reasons).

I was leaning toward option 3 since option 1 would mean exposing the IP address of the game server to the player’s brower. Is that a reasonable assumption since option 1 would require the IP address to be in the page served?

And also am I allowed to have PHP code that fetches data from another server outside of infinityfree’s network to help generate the page?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.