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 Apr 14, 2013Even if I'm just using PHP -> Bukkit, does my web server port need to be open both in and out?
Thanks, NXTGUY
-
View User Profile
-
Send Message
Posted Apr 9, 2013@Ezriilc
I'll look into this.
-
View User Profile
-
Send Message
Posted Apr 7, 2013I'm having some trouble with WSEvents. Even though I've used Websend for a long time, I'm new to WSEvents.
Setting PlayerJoinEvent=true in \plugins\WSEvents\player.txt causes this error, and no events are sent.
InventoryOpenEvent=true DOES work, but it seems like enabling anything in player.txt breaks all events with the above error.
Is this a known problem? Am I doing something wrong?
-
View User Profile
-
Send Message
Posted Apr 7, 2013@xMinecraft
With WSEvents, you can automatically do a websend request on a server event. For example: If you enable the PlayerJoinEvent event in the config, it will execute "/ws PlayerJoinEvent" every time a player joins.
-
View User Profile
-
Send Message
Posted Apr 5, 2013What's WSEvents?
-
View User Profile
-
Send Message
Posted Apr 4, 2013@robin00212
That will break it no matter what else is done. They can't be on the same port, AFAIK.
The standard port is 4445, but whatever you use, the PHP must match the config file in the plugin.
-
View User Profile
-
Send Message
Posted Apr 4, 2013It dont work for me, Heres the errors i get:
Warning: unpack() [function.unpack]: Type C: not enough input, need 1, have 0 in /home/guncraft/public_html/WSend/Websend.php on line 95
Warning: unpack() [function.unpack]: Type C: not enough input, need 1, have 0 in /home/guncraft/public_html/WSend/Websend.php on line 95
Warning: unpack() [function.unpack]: Type C: not enough input, need 1, have 0 in /home/guncraft/public_html/WSend/Websend.php on line 95
Warning: unpack() [function.unpack]: Type C: not enough input, need 1, have 0 in /home/guncraft/public_html/WSend/Websend.php on line 95
I changed the port to 25565 since that's the port of my server because it could not connect with 4655
-
View User Profile
-
Send Message
Posted Mar 30, 2013@hellowar
I'm sorry, but I don't understand what you mean. Did you need help with something?
-
View User Profile
-
Send Message
Posted Mar 29, 2013@Ezriilc
Hello, sorry to bother is that I was developing a system for the WHMCS to my server and to some others is not to use buycraft or any other plugin, because I using WHMCS can customize more items purchase vips or something else!
-
View User Profile
-
Send Message
Posted Mar 29, 2013@Ezriilc
Sorry!
-
View User Profile
-
Send Message
Posted Mar 29, 2013@killa777
Excellent! :D
Thanks for letting me know.
-
View User Profile
-
Send Message
Posted Mar 29, 2013@Ezriilc
Thanks! It works!
-
View User Profile
-
Send Message
Posted Mar 29, 2013@killa777
Oh, right off, I can see a problem in your PHP syntax. Your line of code is missing a period (.) between $user and $money to concatenate the strings together. Here, I've added the space that I think you need for it to work in Bukkit.
I hope this helps!
-
View User Profile
-
Send Message
Posted Mar 29, 2013@killa777
EDIT: I failed to carefully read the line of code you provided, and missed what looks like an easy error. Please see my next comment for a fix.
You are correct that Websend is just sending a string to be executed as a Bukkit command, so the line you quoted should theoretically work, depending on the commands being sent.
But I can't be sure of your syntax out of context.If you copy the entire error and all of your script (w/o private info), I can probably tell you where the problem is.-
View User Profile
-
Send Message
Posted Mar 29, 2013How can I execute a command with php variables? For me that doesn't works:
$ws->doCommandAsConsole("eco give ".$user $money);-
View User Profile
-
Send Message
Posted Mar 27, 2013@Biloutboy
It sounds like you're having the same problem as Hellowar.
Your web server is not able to connect to your Bukkit server. Either your Bukkit server isn't running, Websend isn't running on it, or something in between your web server and Bukkit is blocking it; perhaps a firewall?
-
View User Profile
-
Send Message
Posted Mar 27, 2013Hi, Thanks for that plugin, it seems to be awesome ! But i can't use it : I get an error when trying to go on ExternalTimeSet.php :
Warning: fsockopen(): unable to connect to 88.160.33.43:4445 (Connection timed out) in /home/u420330069/public_html/Websend.php on line 19
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 35
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 35
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Warning: fread() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 95
Warning: unpack(): Type C: not enough input, need 1, have 0 in /home/u420330069/public_html/Websend.php on line 95
Warning: fread() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 95
Warning: unpack(): Type C: not enough input, need 1, have 0 in /home/u420330069/public_html/Websend.php on line 95
Warning: fread() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 95
Warning: unpack(): Type C: not enough input, need 1, have 0 in /home/u420330069/public_html/Websend.php on line 95
Warning: fread() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 95
Warning: unpack(): Type C: not enough input, need 1, have 0 in /home/u420330069/public_html/Websend.php on line 95
Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u420330069/public_html/Websend.php on line 45
Can someone help me please ?
-
View User Profile
-
Send Message
Posted Mar 25, 2013@Ezriilc
You have a skype for help-me ? My skype is: luisjustin
-
View User Profile
-
Send Message
Posted Mar 25, 2013I should mention that I'm using all the latest development builds and I have NO errors on Bukkit start-up
, but I haven't done any testing of Websend to see if it's working yet.EDIT: I've now tested Websend on our updated server, and everything seems perfect! For reference, our server includes the following (this is what my custom script outputs to our website):
-
View User Profile
-
Send Message
Posted Mar 25, 2013@hellowar
OK. Since you're not passing a $port number, it's defaulting to 4445.
fsockopen() is failing because it can't create a connection (stream) to: http://127.0.0.1:4555 Everything else in your error list is being caused by that.
For whatever reason, the Websend plugin isn't responding on 127.0.0.1:4445.
Possible causes:
If I'm not mistaken, the fsockopen() error should be providing more details regarding why it failed - such as:
Since everything is cascading from the fsockopen() error, it's key to focus on the 2nd line of your calling code:
$ws = new Websend("127.0.0.1"); //or 192.168.0.100To get more information regarding the error, try putting this ABOVE your code (TEMPORARILY), like this:
A good connection will return "boolean(true)". Anything else may tell us more.