Want to know if city server is up?

Discussion in 'Development News' started by Afr0, Jan 24, 2015.

  1. Afr0

    Afr0 Well-Known Member

    The city server now dynamically generates a webpage with information statistics at this address.
    If you can access the website, it means the server is up! :)
    Also, you can see how many users are online in case you want to chat!
    aidancheddar likes this.
  2. liinor

    liinor Member

    :D great you got it this fast.
  3. Afr0

    Afr0 Well-Known Member

    PS: If there are any web experts out there, please let me know how safe it is to keep port 8888 open. Should I pick another one?
  4. Blayer98

    Blayer98 Active Member

    Wow this is cool :p
  5. liinor

    liinor Member

    Atleast its more safety than opening port 80.
    And maybe these ports should not be shown cause of DDOSERS.

    Check this out.
    https://answers.yahoo.com/question/index?qid=20131010085008AAqQVwK
    :D
    Last edited: Jan 24, 2015
  6. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    There are no risks keeping any ports open, ever. The risk lies in any vulnerabilities the server software has.

    Web servers normally run on port 80, and 8080 is usually the backup port (but is not normally accessible via browser without adding :8080)
    aidancheddar likes this.
  7. liinor

    liinor Member

    My client disconnected me from city server after I was some time online, or i think so cause I was checking players currently online page. And it showed 0, but when reopened client and opened city view again and checked that page it worked again. I know that server wasn't restarted cause of that time.
  8. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Can you add "Access-Control-Allow-Origin:*" to the cityserver's HTTP header, so that I can access the server status with javascript and put it on the forum header?
  9. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

  10. aidancheddar

    aidancheddar Active Member

    Sweet! This will make life easier.
    Unless you're still working on the script, I'm getting the status isn't changing:
    [​IMG]
  11. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Why do you think I asked that question? It is completely impossible to XMLHttpRequest the page without that property being present in the HTTP header. It will work when the header is present.
  12. Blayer98

    Blayer98 Active Member

    Hey, Just wondering why the avatar doesn't appear where it should be in map view? (If you click it, it should open a SimPage.)
  13. aidancheddar

    aidancheddar Active Member

    It was there when I got one. I thought it was a bug. Sue me.
  14. Afr0

    Afr0 Well-Known Member

  15. Blayer98

    Blayer98 Active Member

    That's what TSO does when people are AFK for more than 15 minutes. I think...
  16. aidancheddar

    aidancheddar Active Member

    Yup. Though, there was a way around it by pressing the enter key repeatedly.
  17. Afr0

    Afr0 Well-Known Member

    Working! :D
  18. liinor

    liinor Member

    Its awesome.
  19. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Super nice! It currently assumes a certain order, so of the order changes the result could get fucked up. You should probably wrap the info in spans like

    <span id="usersonline">2</span> users online

    in future, with things like the users online, city name, lots active (soon...)
    aidancheddar likes this.
  20. Afr0

    Afr0 Well-Known Member

    Hmmm, yeah.
    Right now I have a few things on my list, the first one of which is to fix the message GUID issue.
    Then I want to have a ping/pong packet sent back and forth from city to client. But I might not need it, it'd be enough to implement the time of day packet for the connection to stay alive.

Share This Page