Page 1 of 1

Getting Player PHP

Posted: Thu Dec 27, 2012 5:08 am
by FrederickGeek8
If it possible to get the players names from a Minecraft Server with PHP? If o how do I do it? If I can't do it without plugins, is there any open-source/license plugins that I can use? Any awesome betterphp code snippets? ;)

Re: Getting Player PHP

Posted: Thu Dec 27, 2012 9:31 pm
by Helx
Look into MineQuery.

There's a bit of API usage in this BetterPHP tutorial, follow the same sorta concept.

Re: Getting Player PHP

Posted: Fri Dec 28, 2012 6:58 am
by FrederickGeek8
I thought that Minequery was now "obsolete" and "incompatible". Is there a way to do this with GameSpy4 (Minecraft's default query)

Re: Getting Player PHP

Posted: Fri Dec 28, 2012 7:45 pm
by Helx
FrederickGeek8 wrote:I thought that Minequery was now "obsolete" and "incompatible". Is there a way to do this with GameSpy4 (Minecraft's default query)


Oh yes, my mistake.

I found this: https://github.com/NoxNebula/Minecraft-Server-Status.
I'm not sure about versions, but it was last updated 4 months ago. I'm sure that this would work on most versions anyway.

However, I haven't tested it..

Re: Getting Player PHP

Posted: Sat Dec 29, 2012 1:25 am
by jacek
You can do it with the built in query server if "enable-query" is set to true in the server.properties file. I have played around with this and come up with something that sort of worked. There is some documentation on the query protocol here http://mc.kev009.com/Query the full Stat includes player names.