WebBridge
With WebBridge you can simply read any kind of information from the minecraft server at your webserver! You can for example easily find out hown many players there are on the server, what their names are or what armor they wear. You can also execute commands from your website. All this is made possible by the bukkit plugin and PHP-API. Read further on for more information.
Here you can find some essential information about WebBridge. To go more into detail visit the GitHub wiki: https://github.com/sixteenpixels/webbridge/wiki
On Bukkit, you can donwload the plugin which is needed to run WebBridge. This plugin has the assignment to log information to a database and to execute commands.
WebBridge was made by sixteenpixels!
Note: There may be bugs and issues while using WebBridge. Report bugs to: [email protected]
(1) What is WebBridge?
WebBridge is a PHP-API with a proper Ajax-Interface, which allows you to easily communicate between your Minecraft-server and your webserver. It also includes the possiblity to execute certain commands! And it's really simple! For example, to find out, how many players there are currently online, two lines of code are enough:
$server = new Server;
echo "Player online: " . $server -> getPlayerOnline();
(2) What possiblities do I have with WebBridge?
You can get a lot of different sets of information from the Minecraft-server through the WebBridge API on your webserver. It would take you a maximum of two lines to find out, how many players on the server currently are or to find out a player's ping. The second great possibility of WebBridge is using the JobSystem: It makes it possible to send a set of predefined commands to the server. So you can control your server easily from the web.
(3) How do I set up WebBridge?
That's a quiet easy procedure: I have written a easy-to-follow tutorial for you:
https://github.com/sixteenpixels/webbridge/wiki/1.-Tutorial:-Setting-up-WebBridge
(4) How can I use WebBridge?
For using WebBridge on your website you have two possibilites:
a. The PHP-API
--> Tutorial about how to use the PHP-API:
https://github.com/sixteenpixels/webbridge/wiki/2.-Tutorial:-Using-WebBridge-with-PHP
b. The Ajax-Interface(Javascipt)
--> Tutorial about how to use the Ajax-Interface in Javascript:
https://github.com/sixteenpixels/webbridge/wiki/3.-Tutorial:-Using-WebBridge-with-Javascript
So as you see you will need a basic knowledge of one of these two languages. In some cases, using the Ajax-Interface will be a better solution, but this and more will be explained in the proper tutorial.
I not find wb.php in my plugin dir
So I got this plugin working and tested it
in short: Plugin is good to use with local db or remote db (make sure your host can provide these services). PHP API and AJAX interface working as they should. Documentation is sufficient. plugin needs some work tho
NOTE: in order to display data you need to build your own interface, this is not provided! (imo this is a pro since i'm a web developer)
@sixteenpixels: What I suggest is let people choose there own database instead of creating or 'demanding' it to be webbridge and add a prefix as an option as well. i.e. I already had a minecraft DB running for other data i'm pulling from my server. Now I have 2 which isn't ideal for joined tables or data display. And I'm getting a lot of warnings in my console causing lag on my server.
@sixteenpixels
I'm having trouble connecting to my DB, connection details are right, made no mistakes there, but it still says otherwise: [connection_error].. I don't know where or when the DB should be created, couldn't find it in the PHP files but then again I couldn't test it due to the connection error ;P
Next, there is a typo in your language file (URL):
and I've translated the lang.php file in Dutch [NL], will do a pull request in the near future
[EDIT] Fixed my DB connection. It's not clear in any of the documentation the end user should name the database 'webbridge' when creating it. It's still not working for me because no table is created up till now, so there is no data to pull
[EDIT2] Now the plugin can't connect to the database, if the plugin sets the table it can't which makes the plugin unusable thus useless
@pokekart2014 Yes you're right I forgot to update the links, sorry man! Now they work!
Your tutorial to set up isn't working...