Getting Player PHP

Any help topics that don't fit in the current categories can go here.
Post Reply
User avatar
FrederickGeek8
Posts: 148
Joined: Wed Nov 30, 2011 10:31 pm

Getting Player PHP

Post 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? ;)
User avatar
Helx
Posts: 350
Joined: Thu May 17, 2012 6:45 am
Location: Auckland, New Zealand

Re: Getting Player PHP

Post by Helx »

Look into MineQuery.

There's a bit of API usage in this BetterPHP tutorial, follow the same sorta concept.
User avatar
FrederickGeek8
Posts: 148
Joined: Wed Nov 30, 2011 10:31 pm

Re: Getting Player PHP

Post by FrederickGeek8 »

I thought that Minequery was now "obsolete" and "incompatible". Is there a way to do this with GameSpy4 (Minecraft's default query)
User avatar
Helx
Posts: 350
Joined: Thu May 17, 2012 6:45 am
Location: Auckland, New Zealand

Re: Getting Player PHP

Post 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..
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Getting Player PHP

Post 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.
Image
Post Reply