PHPsend - Connect your website with bukkit server Version: 0.9 Have you ever wanted to make automatic-VIP system? Have you ever wondered of web-orieted remote console? Have you thought of player list on your website? Have you ever needed a lightweight, most simple ever, no-lagging solution? This plugins allows you to do this!!! Simplicity - Stability - Capabilities Code: $c=new PHPsend(); $c->PHPconnect("sv.myserver.org","myPassword"); $c->PHPcommand("say hello world!"); $c->PHPdisconnect(); THAT'S ALL! ------->Bukkit DEV<------- Features: Execute console commands from PHP script Using MD5 password to authenticate POST request for Bukkit -> PHP Simple API with 3 fuctions! One command to communicate with website! No-lag due to separate thread Configurable port (default: 11223) EXTREME small (10kb plugin, 2kb API) Support for /reload!!! Exceptions oriented - no crashes and errors! Most simple ever plugin API! Create own Plugins and contact your website! NOW ALSO BUKKIT -> PHP NOW ALSO PHP -> BUKKIT PLUGIN USING PHPSEND -> PHP!!! POST ANY BUGS IN COMMENTS (I FIX THEM THEN)! Installation: Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler * Download and unzip PHPsend.zip. * Put PHPsend.jar into plugins folder of your server. * Reload/Restart your server. * PHPsend will generate config in plugins/PHPsend named config.yml * Copy random-password or change it * Change port if needed * Change postDataUrl if you want to use Bukkit -> PHP * Upload PHPsend.php on your website. * When you need to use API, on the beggining of the php code include PHPsend.php * Write your code and use it as you wish! API - Simple Connection Guide Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler Firstly, in the beggining of the code include PHPsend.php Code: <?php include_once("PHPsend.php"); ... Then you need to create PHPsend connector and connect to server. We store the results in $succ. Code: ... $con = new PHPsend(); $succ = $con->PHPconnect("SERVER ADRESSS","PASSWORD","PORT"); ... $succ is 0 when everything is OK. $succ is 1 when PHPsend couldn't connect to server $succ is 2 when Password is incorrect. You can check the results, but I'm going to skip this step now. We are connected, so we can execute commands: Code: ... $con->PHPcommand("say Server says Hello!"); $con->PHPcommand("say Server sets time to Day!"); $con->PHPcommand("time day"); ... PHPcommand return 0 when command was executed, 1 otherwise (THIS DOESN'T INCLUDE COMMAND ERROR, LIKE "UNKNOWN COMMAND") but It's rarely used. After executing commands, we have to disconnect from server. Code: ... $succ = $con->PHPdisconnect(); ... $succ is 0 when disconnected succesfully $succ is 1 when disconnecting failed (server not responds) You can handle those errors, if needed. We are done. Next client can connect now. For more complex examples, Bukkit -> PHP and Plugin API visit bukkit dev !DOWNLOAD!---------------------------------Source code NOTE: If you are using JRE1.6, download that version: Download - 0.9J1.6 TODO: I'm open to your suggestions Check EVERY SINGLE line for any possible errors. Changelog: Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler Version 0.9 *Bukkit -> PHP *PHP -> Bukkit -> PHP *Plugin API *POST requests Version 0.7 *Inital beta release Post suggestions and bugs here please I'm new to bukkit API and not sure if my code is 100% working :/ EDIT by Moderator: merged posts, please use the edit button instead of double posting.