On Agoralis, a role-play Minecraft server, a player can buy a house from their phone. They tap "Buy" in the web app, the money leaves their bank account, and in the same request the region is theirs in the game: they become owner, the seller gets an in-game message. The same goes for jobs, XP and permissions. None of this goes through a database the game reads. Every action is a console command sent over RCON.
This article shows how we wired that up in Laravel: what an RCON packet looks like on the wire, how authentication works, how PHP sockets behave when the server does not answer, and the error-handling choices we made (and would make differently today).
TL;DR
RCON is a tiny TCP protocol: each packet is size | id | type | body\0\0 , all integers 32-bit little-endian.…