[DEV/WEB] WebSend v2.4 - Use PHP and other web-languages for bukkit! [1.4.7-R1.0]

Discussion in 'Archived: Plugin Releases' started by Waterflames, Jul 21, 2011.

  1. Offline

    Waterflames

    websend-icon-text-smaller.png

    WebSend - Use PHP for Bukkit!:
    Version: v2.3
    BukkitDev: http://dev.bukkit.org/server-mods/websend/
    What does this plugin do?
    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.

    Example scripts are provided in the files.
    !!! IMPORTANT NOTE !!!
    Use the bukkitDev forum for bugs, questions and other stuff. I will no longer respond here!

    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))
    Installation: (more detailed instructions can be found on bukkitdev):
    1. Put the plugin in the plugin folder.
    2. Start/reload server to allow the config file to be generated.
    3. Open the example php file and fill in your password.
    4. Upload the example php file to your server.
    5. Open the config file and fill in the settings.
    6. Reload server and test with "/ws timeset".
    7. Go to the bukkitDev page to find instructions to get started.
    Download on bukkitdev.

    Changelog:
    Show Spoiler

    For more changelog, visit the bukkitdev "files" section.
    Version 0.9:
    • Fixes false error reporting
    • A debug feature was added.
    Version 0.8.1:
    • Couple of small bugfixes for 1240
    Version 0.8:
    • Added error report on invalid /Command/
    • Added warning if the first line doesn't contain the password.
    • Added proper disabling code for ServerSocket.
    • Tweaked the variable checking.
    Version 0.7.1:
    • Added extra POST data. (Info)
    Version 0.7:
    • Enabled input from console
    • Implemented a config line to use a custom port.
    Version 0.6:
    • Added extra POST data. (Info)
    Version 0.5:
    • Added the other way (PHP -> bukkit) Port 4445 needs to be forwarded.
    • Improved config file reading
    • Optimized code structure.
    Version 0.4:
    • Added option to use port 4444 opposed to the default
    Version 0.3:
    • Added color feature. (examples in supplied zip.)
    • Added Console command option (Use /Command/ExecuteConsoleCommand)
    Version 0.2
    • Fixed permissions plugin absence error.
    Version 0.1
    • Plugin released
     

    Attached Files:

  2. Offline

    King_KYl3

    Huh my paypal user name ect? Mad i will please replie asap Thanks Alot :D
     
  3. Offline

    Waterflames

    Nevermind, I found a script on the internet. I'm modding it to work with websend :D

    I'll post it when I'm done
     
  4. Offline

    King_KYl3

    Man Thank you so much because soon i will have a website once my server is open liek i pnly have trail version of website so yer carnt really tell you anythink but if you could make some think epic like that were it will do a command if some1 donates to your paypal via your website ect Btw it is like this but those people wouldnt add website support :/ BuyCraft Write that in check it out! Thanks Alot Once Again :D
     
  5. Offline

    Waterflames

  6. Offline

    King_KYl3

    Woah lol you know im noob this makes no sence lol i will have to wait for some one else to test :D but alot of people will find this handy i might try test tommorow hard but if you sorta could make a youtube vid if you carnt dw Good Job XD
     
  7. Offline

    greyfire

    you my friend have just been book marked :) this will be easy to get donator status up, anthor thing that might be missing is if you can get it to work with economy in there.
     
  8. Offline

    Kaosvf

    Hi,
    hmm, can you provide an example?
     
  9. Offline

    Waterflames

    You mean like getting the response from a command into php?
    I don't think bukkit provides a way to get the output of a plug-in... So, unless you hijack the system.out stream and the log, which would be inaccurate and inefficient, it is not possible (yet).
     
  10. Offline

    Sp0ng3b0b

    I LOVE YOU :D The only language i master is php :D
     
  11. Offline

    Kaosvf

    ah ok, I understand, thx.
     
  12. Offline

    Waterflames

    Thats what it was made for :D

    BTW: you're all welcome to share your scripts here if you want
     
  13. Offline

    DeathmannX

    I tryed out but it dosen't work.
    What did you mean with:
    This is my config.txt
    Code:
    #Configuration and settings file!
    #Help: URL: set to the full path of your server php file (see example).
    #Help: PASS: change the password to one of your choice (set the same in the server php file).
    URL=http://123.456.789/minecraft.php
    #Optional settings. Remove the '#' to use.
    FORCEPORT=true
    FILE=minecraft.php
    WEBLISTENER_ACTIVE=true
    #ALTPROTECTION=
     
  14. Offline

    Waterflames

    Change it to:
    Yet don't forget the password, if you let it out. (PASS=)

    Forward port 4445 (Google port forwarding if this sounds like chinese to you.)
     
  15. Offline

    DeathmannX

  16. Offline

    Waterflames

    Because you didn't configure the plugin right:

    You forgot to set URL= to the path of your page.

    So if you uploaded your php file to examplesite.com/minecraft.php
    then you change the URL=http://123.456.789/minecraft.php to URL=examplesite.com/minecraft.php
     
  17. Offline

    DeathmannX

    This is what i've done 123,456.789 was youst an example.
    This file is not avaible with an ip because i set it so on apache.
    and if i try a local path there is the same problem.
     
  18. Offline

    Waterflames

    Lets try this from step 1:
    Replace your config file content with this:
    #Configuration and settings file!
    #Help: URL: set to the full path of your server php file (see example).
    #Help: PASS: change the password to one of your choice (set the same in the server php file).
    URL=thePath
    PASS=APassword
    WEBLISTENER_ACTIVE=true

    replace APassword with a password you pick, make sure your php file has the same password
    replace URL with the path (not just raw ip), local or not local. The path where your browser is able to access it and find it executed (not the code).
     
  19. Offline

    DeathmannX

    I've tested it but no sucess.
    Code:
    #Configuration and settings file!
    #Help: URL: set to the full path of your server php file (see example).
    #Help: PASS: change the password to one of your choice (set the same in the server php file).
    URL=http://minecraft.morangonetwork.de/mc_scripts/minecraft.php
    #Optional settings. Remove the '#' to use.
    #FORCEPORT=true
    #FILE=minecraft.php
    WEBLISTENER_ACTIVE=true
    #ALTPROTECTION=
    PASS=xxxxx
     
  20. Offline

    Waterflames

    Did any errors come up?
    The minecraft.php file, is it the default I supplied?
    Are you trying to do bukkit -> PHP -> bukkit, or PHP -> bukkit?
     
  21. Offline

    AndyPandy89

    Made a little script to display warps from the xWarp-plugin (reason being that /warp list struggles with performance issues and causes the server to hang). Probably wont be very useful to many people, but thought I'd post it anyways.

    http://pastebin.com/3LqpnCW6

    (My code isn't perfect, but neither am I)
     
  22. Offline

    Waterflames

    Thanks for sharing!
     
  23. Offline

    DeathmannX

    server.log
    Code:
    [SEVERE] null
    java.net.BindException: Address already in use
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at java.net.ServerSocket.<init>(ServerSocket.java:97)
        at websend.PHPSktSrvrThread.run(Main.java:280)
    bukkit->PHP->bukkit
     
  24. Offline

    Waterflames

    That shouldn't be a problem for now. Anything else?
     
  25. Offline

    DeathmannX

    No Idon't know.
     
  26. Offline

    Waterflames

    Try putting a # before the
    WEBLISTENER_ACTIVE=true
     
  27. Offline

    nathanaelps

    Growf. I *think* I've followed all directions, down to the letter. I'm using the default minecraft.php file (I changed its name, however, and moved it to http://******/Minecraft/bukkit.php). When I try '/ws consoleCommand', nothing happens. If I check the console, after about thirty seconds it tells me this:

    Code:
    14:11:36 [SEVERE] null
    java.net.ConnectException: Connection timed out
            at java.net.PlainSocketImpl.socketConnect(Native Method)
            at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
            at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
            at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
            at java.net.Socket.connect(Socket.java:546)
            at java.net.Socket.connect(Socket.java:495)
            at sun.net.NetworkClient.doConnect(NetworkClient.java:174)
            at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
            at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
            at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
            at sun.net.www.http.HttpClient.New(HttpClient.java:321)
            at sun.net.www.http.HttpClient.New(HttpClient.java:338)
            at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:935)
            at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:876)
            at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:801)
            at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:979)
            at websend.Communicator.sendPOST(Communicator.java:42)
            at websend.ComThread.run(Main.java:256)
    
    Still, nothing comes up on the client side.

    Things I've checked twice already: Password, Server PHP URL, Port 4445 is open (Even though WEBLISTENER_ACTIVE is removed)... I'm getting irritated with it, and I'm sure it's all my fault! :D

    What boneheaded thing have I forgotten to do?

    Here's the config file I'm using:
    Code:
    PASS=*****
    URL=http://*****/Minecraft/bukkit.php
    
     
  28. Offline

    Waterflames

    The problem seems to be that the plugin can't find/access the file.
    Can you access it from your browser, and if yes where do you host your files?
     
  29. Offline

    nathanaelps

    I can access it from my browser; it tells me (obviously enough!) 'No (enough) data provided.;'.

    And I host my files, MC server, web server, etc. on my own personal Linux box, behind my own firewall, router, modem. Everything has port 4445 open/forwarded to the server. Though... That raises an interesting thought. Hold on.

    *tinker*

    Aha! I have a (sufficient) fix! I had the URL set to my public address (which should work... but...). I changed it to 127.0.0.1 and it's working now.

    Not sure *why* that didn't work. But it didn't. And now it is. Bone-headed me. Thanks for helping! I love the power that I'm promised with this plugin!

    ----

    EDIT: And now I'm having trouble with php->bukkit. I'll ask more questions after I've beat my brain against the wall for awhile.
     
  30. Offline

    Waterflames

    Glad to hear it works :)

    I'll be here to help :)
     
  31. Offline

    DeathmannX

    I've did thisand no message more on the log file.
    But the Plugin didn't run. (over port 4444 etc.)
     

Share This Page