Websend
Websend
EOL notice:
After almost 6 years, this plugin has reached an end-of-life status.
I will no longer be maintaining this plugin. If you are a developer and are interested in the source code of this project, feel free to use it as it is published under an MIT license.
To all the great people in the community: Thank you for the wonderful time!
Documentation can be found on Github wiki. (Edit: 9/2/2017: link fixed)
Source code can be found on Github.
What does this plugin do?
This plugin enables PHP developers to access minecraft commands from a web-based script.
A scheme: Ingame command -> Your php-enabled server -> Your PHP file does stuff and provides output/commands -> Plugin executes commands and prints output. Or: Webpage command -> bukkit server -> Plugin executes commands and prints output.
A few of the possibilities:
Online adminstration screen Online console Membership system (become VIP with a donation) Paypal donation system ...
Features:
Seperate thread (no server lag because of the wait.) Commands (ingame or console emulation) Command to color output send from php. Secure connection (protected with password hash) Permissions support (just "websend") Both ways enabled (PHP -> bukkit | bukkit -> php (-> bukkit))
Head over to the files for the latest version, and here for installation instructions.
Documentation and more.
-
View User Profile
-
Send Message
Posted Aug 21, 2012it's possible to use the plugin in por 80 or 443? Thanks
-
View User Profile
-
Send Message
Posted Aug 21, 2012@TanveerGT5
I have the script made to paypal and paygol on my server, but now that i'm going to change host i don't have a host that allows fsockopen funcion. Do someone know any cheap or free webhosting that allows sockets?
Thanks.
TanveerGT5 if you want the script add me on skype: mig4ng21
-
View User Profile
-
Send Message
Posted Aug 19, 2012Waterflames anything we can do to help you with the next version?
-
View User Profile
-
Send Message
Posted Aug 17, 2012Hi I'm looking for a way to use Paygol.com (IPN) (SMS payments) to automatically give my users "perks" on my minecraft server, how would I hook Paygol to Websend? I tried but failed miserably...
-
View User Profile
-
Send Message
Posted Aug 15, 2012@MonarchyPlugin
I can write this application for you without Websend. You just need a SSH enabled server and SSH2 installed. In addition I can also write it for Websend.
-
View User Profile
-
Send Message
Posted Aug 12, 2012@MonarchyPlugin
Simple make Paypal go back to a webpage that onload promotes said player and on Page_load make the Commands fire. and then redirect to another site... To get the persons ign name you can either ask for it before they get redirected to paypal or make a login one you website that they need to sync with there mc account ingame.
-
View User Profile
-
Send Message
Posted Aug 10, 2012Anyone going to update and patch this plugin so it works smooth on 1.3.1? it is a very promissing plugin. I would donate the first instance i receive a donation for my server using this plugin and would encourige anyone who likes this plugin alive todo the same.
p.s. meanwhile, does anyone know of a way to already process/automate donations, then on the callback of paypal, hook things up so it fires "/permpromote %player% Donator+" for example?
-
View User Profile
-
Send Message
Posted Aug 6, 2012Hmm... When server is starting 4445 port opens for 1-2 seconds. But then it closes.
-
View User Profile
-
Send Message
Posted Aug 6, 2012Hello. I have a problem. I forwarded port 4445, choosed password and added to config "WEBLISTENER_ACTIVE=true". But PHP script can`t connect to the server (error at $ws->connect("MyPasswordHere")or die('Connection error');). What else I need to do? I am using version 2.0 and I have no errors at server startup exept "[WARNING] [Websend] Default bukkit detected, plugin output capturing may not function properly.". Maybe weblistener is not working? Thanks.
-
View User Profile
-
Send Message
Posted Aug 4, 2012When I call a command via /Command/ExecutePlayerCommand:spawn it doesn't work and I receive the following message on the console:
[Websend] An error has occured, are you trying to execute a player command from console?
I am not sending this from console. I am typing this command in-game. Is this a bug? I am running a Bukkit Dev version for 1.3.
-
View User Profile
-
Send Message
Posted Aug 1, 2012@rainsillwood
websend.php, line 18: replace writeChars with writeString , problem seemed solved, but sometimes still throw EOFException, did "$this->writeRawInt(count($array));" needed anywhere?
-
View User Profile
-
Send Message
Posted Jul 31, 2012I need to use Fsockopen instead of socket_create. Is this possible? thanks!
-
View User Profile
-
Send Message
Posted Jul 31, 2012Same error :/
-
View User Profile
-
Send Message
Posted Jul 27, 2012When I runned ExternalTimeSet.php,the server gave me errors: 00:45:26 [INFO] [Websend] Client connected. 00:45:26 [INFO] [Websend] Client is trusted. 00:45:26 [INFO] [Websend] Trying to read first byte. 00:45:26 [INFO] [Websend] First packet is password packet. 00:45:26 [SEVERE] null java.io.EOFException at java.io.DataInputStream.readChar(Unknown Source) at Waterflames.websend.server.PacketParser.readString(PacketParser.java: 82) at Waterflames.websend.server.PacketParser.parsePasswordPacket(PacketPar ser.java:59) at Waterflames.websend.server.CommunicationServer.startServer(Communicat ionServer.java:73) at Waterflames.websend.server.CommunicationServer.run(CommunicationServe r.java:45) Is there any problem?
-
View User Profile
-
Send Message
Posted Jul 26, 2012are there any permissions for bukkit->php->bukkit? If not may i suggest you to add some (permission per command like - websend.timeset)
-
View User Profile
-
Send Message
Posted Jul 21, 2012i'm probely just being stupid and not looking in the right place, but where do you need to put the url to the php file that will receive the post variables caus in my config it only says:
#Configuration and settings file!
#Help: PASS: change the password to one of your choice (set the same in the server php file).
#Help: DEBUG_WEBSEND: shows debugging messages for easier tracking of bugs.
#Help: SALT: adds a salt to the hashed password when sending over bukkit -> php connection.
PASS=YourPassHere
#Optional settings. Remove the '#' to use.
#ALTPORT=1234
DEBUG_WEBSEND=true
#SALT=abc123
and when i run my server and use the command /ws test
it will say no url found check you config files
-
View User Profile
-
Send Message
Posted Jul 18, 2012would this work over https?
-
View User Profile
-
Send Message
Posted Jul 16, 2012From what I followed the code the unpack() is not even touched before the code times out.
I move the fread() into a line above and it failed all by itself without the unpack ever being called.
I changed the function to this here for debugging:
private function readRawByte() {
echo "startin readrawbyte\n"; // this works
var_dump($this->stream); // this returns resource typ stream
echo "fread stream\n"; // works
$stream = stream_get_contents($this->stream); // times out, tried alternative to next line
// $stream = fread($this->stream, 1); this alsotimes out
echo "unpacking stream\n"; // this never displays, code dead from here on.
var_dump($stream);
$up = unpack( "Ci", $stream); //fread( $this->stream, 1 ) );
$b = $up["i"];
echo "ending readrawbyte\n";
return $b;
}^
-
View User Profile
-
Send Message
Posted Jul 16, 2012@uncovery
The problem is in the usage of the unpack() method. The EOF exception is because Java is trying to read a byte that was never sent.
-
View User Profile
-
Send Message
Posted Jul 16, 2012Only trying to run the php->bukkit right now.
I manage to connect. But commands generally fail such as $ws->doCommandAsConsole("say test"). In the function
private function readRawDouble() { $up = unpack( "di", strrev( fread( $this->stream, 8 ) ) ); $d = $up["i"]; return $d;^ }
on the php side, the Websend class freezes on the fread() part which I found out after taking the process apart step by step. The function is called in the end of doCommandAsConsole() through the
if($this->readRawInt() == 1){
line. Interestingly, there is no efffect of the writeString() at all on the console. Don't know if this is normal however. On the bukkit side, I get a 17:28:58 [SEVERE] null java.io.EOFException at java.io.DataInputStream.readByte(DataInputStream.java:267) at Waterflames.websend.server.CommunicationServer.startServer(CommunicationServer.java:71) at Waterflames.websend.server.CommunicationServer.run(CommunicationServer.java:45)
I am running the PHP script from the console. Bukkit has no plugins installed except Websend.