(Simple) php script

Discussion in 'Server & Community Management' started by Floww, Jan 30, 2013.

  1. Hello,

    I don't know so much about php, so I'm asking you to help me.

    I have 3 servers running and I want to display a global online user count on my website.

    Example:

    Total users Online: (server1+server2+server3)

    There is running minequery on all servers.

    Is this possible?

    Floww
     
  2. We just finished coding ours. I couldn't figure it out so I asked one of our other Admins. http://www.netherquartz.com

    We are using a combination of https://github.com/xPaw/PHP-Minecraft-Query with some php arrays and functions.

    The trick is to make an array of the servers you want to query and run a foreach loop that gets the player count and adds it to a global variable for each server.
     
  3. jeff142

    Benefactor

    If you gave me the IP's to the servers i could make you a quick script
     
  4. Okay, I will send you a pm :) Thanks.
     
  5. jeff142

    Benefactor

    I need the query ports that are being uses ed, not the server ports.
     
  6. Okay, sorry.

    1. 25544
    2. 25565
    3. 25555,

    they're like serverports. Or must I change them?
     
  7. jeff142

    Benefactor

    s
    server.properties

    enable-query=true

    query.port=25565


    Depends how you did it.
     
  8. Jeah,

    server-port=25565
    query.port=25565
     
  9. jeff142

    Benefactor

    Are the ports forwarded out? and can you check your install? it dose not work for me (replace with my server ips and it works)


    Add this in your server.props

    minequery-port=25566
    Change the port for each server, i think your overlaping ports with the 3 servers
     
  10. Yeah, but I can change the ports. Do you have the same query ports and serverports?

    Edit: Okay, I will post my minequery-ports ;)
     
  11. 1. minequery-port=25560
    2. minequery-port=25561
    3. minequery-port=25543
     
  12. jeff142

    Benefactor

  13. jeff142

    Benefactor

    • Like Like x 1
  14. Yeah, it works.

    Thank you very much! :)
     
  15. jeff142

    Benefactor

    No problem, share it forward.