Open Angrygargamel opened 2 months ago
Getting information from Minecraft servers doesn't work for me at all. I'll use this https://github.com/xPaw/PHP-Minecraft-Query
@ReaperIM well you need to set enable-query=true query.port=25565 in your server.properties file (edit the port as you like)
never had any problem with minecraft and query so far...
the view.php does exactly the same only the view_serverping.php uses other methods...
yep, if query port 25565... but query port can be custom 19132 for example.
thats what i meant with edit the port as you like... or better as it fits...
I've started to modernize GameQ and establish support for the latest PHP versions, which means I've also fixed this deprecation. Feel free to check out my fork: https://github.com/KrymoSoftware/GameQ. Version 4.0.0 is released and ready to use.
yep, if query port 25565... but query port can be custom 19132 for example.
You can always use a custom query port by providing a value to the query_port
option:
$gameQ = new \GameQ\GameQ();
$gameQ->addServer([
'type' => 'minecraft',
'host' => '127.0.0.1:25565',
'options' => [
'query_port' => 27000,
],
]);
Nevertheless, port 19132 belongs to Minecraft: Bedrock Edition... So you'll probably want to use the type minecraftbe
instead of minecraft
(Java Edition).
Hello there... when i want to query our Minecraft Server on PHP 8.3.11 it throws me an error (also appears on 8.2) 'Function utf8_encode() is deprecated' in line 255