At first, you have to connect to server on standard, blocking, stream, IPv4 socket. Then, you must send md5 of password followed by endline character. Server will respond with message containing password authentication result.
Message can be:
PHPSpass0- password correct
PHPSpass1- password incorrect
After reciving password incorrect msg, you have to cleanup and connect again.
After reciving password correct msg, you are ready to send commands.
Now you can send commands in following format:
Player\n <flush> Command\n <flush>
If you want to execute command as player, use [server].
After each command you should receive msg
PHPScmd0. If you don't get it, then something happened to your server (:C)
When in command's mode you need to send disconnect message, whhich is
PHPSdisconnect followed by newline character. You should then
receive last msg,
PHPSdisconnect0. If you don't get it, then something happened to your server (:C)
It's all :) You want more? Sorry, this is SIMPLE plugin ;) Anyway, I'd recommend to use my API, becouse it has all possible functions implemented :3