Online Server status image for EE

edited May 2016 in EmptyEpsilon
I got bored watching Twitch.tv before I went to bed last night, so I created a PHP script that generates an image with the current running servers. The PHP script queries the master-server and generates an image with the current info.

My PC is behind several routers at the house, so, I wasn't able to test this with an actual server being announced.
It should display the Server Name & the Version of the game running if there are available servers. I'll probably link to the image on the Unofficial Build Page.

image

Direct link to auto-generated image: http://bridgesim.net/status/emptyepsilon.php

I can share the source if anyone wants it.

Comments

  • It errors when there is a server running.



    Warning: imagestring() expects parameter 5 to be string, array given in /home/forums/public_html/bridgesim/status/emptyepsilon.php on line 23
    Output on the master server looks like this:
    82.161.233.115:35666:0:Server
    
  • edited May 2016
    Ok, should be an easy fix. I'll fix it tonight and push it up to Github.
  • edited May 2016
    Fixed, along with a font change and other tweaks.
  • okay i see the link showing my internet game when I load it, but is there a way to connect or does the game do that ?
  • edited May 2016
    The Image (and the link to it - a PHP script that dynamically generates an image) just shows servers that the master server is listing. You'll need to change the option from LAN to Internet on the client screen in game to connect.

    The image is to let people know that there's a server online and which version is needed to connect.
  • Ohh I see, okay. Then it works great!
  • My goal for this was so that people can easily see that there's servers online and can then open EE and join in on a game.
  • edited May 2016
    After thinking about this some more; I might add the 2 letter country code to the image, based off the server IP. That way people can tell if they are closer to a particular server, or in a country that speaks the same language.
  • edited May 2016
    Good idea, if you're still interested, I've been pretty satisfied with ip2c for previous work (very simple to use). http://ip2c.org

    There is even a ready to use example in PhP : http://about.ip2c.org/#examplephp

    EDIT : If you're feeling adventurous, you can even directly add the flag using the info extracted from ip2c, a good 2-letter code compliant icon pack is here : http://www.famfamfam.com/lab/icons/flags/
  • Yes, I'm still interested in updating it with the country code. Just been too busy with other stuff and been AFK for the past 5 days.
    ip2c looks good. I'll have to give it a test.

  • Added the ip2c code. The Server should now list the country of the server's IP.
  • I am running a server and every time the server is on the picture won't load.
  • I am running a server and every time the server is on the picture won't load.
    There is something up with the newer version of PHP and the image creation. Will have to fix it.
  • I am running a server and every time the server is on the picture won't load.
    There is something up with the newer version of PHP and the image creation. Will have to fix it.
    k

  • Think I may have gotten it. The image is showing with no servers now. Will test with a server
  • Nope still doesn't work for me.
  • Nope still doesn't work for me.
    With or without a server? I'm able to see it without servers.
    I can't test it with a server at the moment.
  • I have a server that shows up on the internet according to my empty epsilon. I have set up port forwarding so it should work.
  • And no it still doesn't work every time I launch the server.
  • I have a server that shows up on the internet according to my empty epsilon. I have set up port forwarding so it should work.
    Ok. I see the error now. Will try to dig into it tonight.
  • I have a server that shows up on the internet according to my empty epsilon. I have set up port forwarding so it should work.
    Ok. I see the error now. Will try to dig into it tonight.
    Yay! I hope you get it fixed cause it's a really good idea.
  • edited March 2017
    Finally got this fixed (I believe), thanks to the TwitchOffice steaming the game so I can see an active server.
    It's listing a single server at least.
  • Just tested with 2 servers. After a quick fix, it seems to be working properly now.
  • edited April 2017
    Looks like the master server is having some issues. Last I checked it was working a few days ago.

    @daid If you're not aware of it, you may want to check your domain. Getting a "The domain is marked as inactive. For more information, please contact your hosting provider. " message
  • Yeah, my domain registar contacted me about possible phishin site on my server. I investigated the claim and found it not to be the case and replied to that. And then they forgot to disable the "auto disable this domain in 5 days" trigger.

    You can imagine that I chewed at them a bit. At the same time, they provide the cheapest EU domain that I could find, and they did resolve it quite quickly.
  • Is this still running? I see the generated image, but it shows no servers.
  • It appears to be still working. There are probably no servers online.
Sign In or Register to comment.