PENDING Server status

Discussion in 'Help Desk' started by Quorod, Mar 9, 2017.

  1. Quorod

    Quorod New Member

    Joined:
    Mar 9, 2017
    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Hi I want to ask where is the problem I have Web Server status of online players, not me there's not seen in previous hosting it worked normally but with McProHosting it somehow does not work do not know what it is? and DinnerBlog it shows a completely different server if there ladies IP address of your server .. you do not know where is the mistake?
     
  2. jacksharkben

    jacksharkben Well-Known Member

    Joined:
    Mar 23, 2015
    Messages:
    1,716
    Likes Received:
    129
    Best Answers:
    1
  3. Kevin M

    Kevin M Active Member

    Joined:
    Dec 20, 2014
    Messages:
    310
    Likes Received:
    207
    Best Answers:
    1
    Hard to understand based on how you wrote this but this is my best guess:

    You have a website and a <span> element containing a script statement executing a certain player amount which is not working based on the server IP which seems to be unreadable by the API. In other words, you have something that looks like this:

    [​IMG]

    I would assume "0" would be an error which in this case you either mistyped the IP in your script to scan the amount of players on your server. For example, for the part where you want your website to read your player amount, you would want to have this code:

    Code:
    <script>
    $.getJSON('https://mcapi.ca/query/play.serverip.com/players', function(status) {
        document.querySelector('.player_count').innerHTML = '<span class="player_count">' + status.players.online + '</span>';
    });
    </script>
    Make sure to replace "play.serverip.com" with your server IP for it to work, otherwise, it will read play.serverip.com which isn't a current existing server.

    If this doesn't work, send me the code to your website (just the span and script portion) and I'll see what I can do.
     

Share This Page