Basically you just make an UDP request and parse it, e.g. with explode(...)

Example code could be found in these projects, google for "php rcon call of duty".
...