xPaw/PHP-Source-Query ? reverse-engineered prompt

Reverse engineered prompt

Build me a PHP library that can connect to Steam and Source engine game servers over UDP and fetch the usual server details, like the server name, map, player count, player list, and public rules. It should also support sending RCON commands when the game allows it, so I can use it with Source games and things like Minecraft where that protocol works.

Please include a simple way to connect, check if a server responds, get info, get players, get rules, set an RCON password, run a command, and disconnect cleanly. Add a couple of small example scripts so it’s easy to see how to use it.

Make sure it works with modern PHP, and keep it compatible with both 64 bit PHP and GMP since that matters for some servers. If you need to look up the current protocol details online to make sure the packets and responses are right, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab