PHPsend
PHPsend
Execute console commands using PHP scripts on website!
This plugin provides simple API and lightweight plugin to allow you command your server from your webpage!
To all updating people. You will have to update your scripts plugins, the main thing is that now functions are prefixed with PHPS instead of PHP (for example old PHPconnect is now PHPSconnect).
PHPsend is now PHPSend**
NEW VERSION
- Logging level (No more console spam!), new logging system
- Hash algorithm is now SHA1
- Player associated commands
- New command: phpsend reload to let you reload config and whitelist without server restart
- IP Whitelist for both php script and plugin
- Post argument style
- Protocol names are now with PHPS instead of PHP (like PHPconnect is now PHPSconnect)
- New plugin hook: onWebCommandAsPlayer
- Cleaned up code
- Minor bugs fixed, more exceptions handled.
- Add few API functions to make your life even simplier.
Pages are updated now. Just wait for approval.
Features:
- Execute commands from web
- Using SHA1 password to authenticate
- Simple API with few fuctions!
- Configurable port (default: 11223)
- EXTREME small
- Support for /reload!!!
Plugin API Tutorial - Making simple online player website
Dev Builds
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
@JeroenD
You need to compile php with
. :) One more guy had this problem. :D Post your results when you finish
Hi, this is a great idea, and i would love to use it for my server. I like your API and was just getting started with a two directional ping system, to check my server's internet connection, mainly as a test.
However, the command seems to be broken. This is what happens:
I type: '/website auth <my correct password> ping 1 '
when i check the $_POST array variable, it shows me that this is what is sent:
key='auth' : val=<my correct password>
key=<my correct password> : val='ping'
Seems to me like you got the order a bit wrong, but it's possible i'm doing something wrong.
I'd appreciate a quick response, thanks for your help :)
-uzalu
EDIT: Just tried something else, got a different result.
Command: '/website auth <my correct password> ping 1 test 2'
$_POST:
key='auth' : val=<my correct password>
key=<my correct password> : val='ping'
key='ping' : val=1
EDIT: I am also getting the incorrect password error, even though i know it is correct. (this is when using the PHPconnect in the php file on remote server.) I am connecting directly to the correct IP for my minecraft server. The connection takes about 15 seconds (longer than i think a password check should take.)
Hey, I am trying to run PHPsend for my server on localhost, but it doesn't work correctly for me yet. I get an error from the PHPsend.php file, on line # 31, where it calles 'socket_create'. The error is "Fatal error: Call to undefined function socket_create() in ...".
I'm using that code in another file: <?php echo "Test1"; include 'PHPsend.php'; echo "Test2"; $c = new PHPSend(); echo "Test3"; $succ = $c->PHPconnect($adress="localhost", $password="3fc1adea46ae6eac", $port=11223); echo "Test4"; $succ = $c->PHPdisconnect(); echo "Test5"; ?>
I added the "echo test" to check where the program stops running. I found out test3 is still displayed, but test4 not. The problem is where it tries $c->PHPconnect(...)
Any ideas what I'm doing wrong, and how to solve this? Thanks in advance, Jeroen
@gepardo43
Glad to help! :) If you have any ideas, post them here :)
Thank you for your plugin!!! Websend is not working for me Keep up this plugin updated :)
@duckdoom5
There is version for java 6. I haven't uploaded link on bukkit dev, its on my forum thread. Will update in 2 minutes :)
@kittyPL
I got this error:
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: org/shadowz/phpsend/MainPhpSend : Unsupported major.minor version 51.0
Edit, nvm, the reason this happens is because of using java version 6, if you don't really need v7 you should use v6 since most people still use v6
@MonarchyPlugin
Thanks! :) I think the main thing that my plugin has and WebSend doesn't, is plugin api, so you can develop plugins using PHPsend ;) I also want to keep it as simple as possible. To execute command you just need 4 lines of code, while in WebSend it's more than 10. Also my plugin is safer, I have handled almost all possible exceptions and the thing that was really, really annoying in WebSend, was no support for /reload. After 45 minutes of hard work I managed to make /reload without errors. It was much harder than I supposed. :)
Anyway, post all ideas you have. I will probably implement them in next version :) Also bug reports with Java version and stack trace are welcome :D
Thanks for your support!
WebSend is outdated. This one is lightweight and seems it can do the job! *Installing*..
+1 for PHPsend
I don't know how "done" this plugin is, but if your not too far into it, Websend does the same thing as this and has been around for quite some time. Link: http://dev.bukkit.org/server-mods/websend/
Don't get me wrong, If your going in a different direction with this plugin by all means keep up the good work, however if Websend does what you were looking to do, why re-invent the wheel; just causes you more work with support.
-John
@imilkywayz
@imilkywayz Thanks :) If you have any ideas post them, and Im sure I will add them asap :)
If you could also approve my plugin submission I'd be pleased: http:forums.bukkit.org/threads/admn-web-dev-phpsend-v0-7-execute-console-commands-with-php-in-4-lines-of-code-1-3-1-r1-0.91679/
Looks pretty cool to me, I was just getting interested in sending data from java to php and vice versa too.