HttpTools
What is httptools?
With this plugin you can make http requests to a web server with variables.Commands
* /ht run <url> [selected player] - Run url Note: [selected player] can be replaced by @p, @a or @r in a command block!* /ht variables - All variables
Variables
When running a url you can use variables like: /ht run http://mysite.com/mypage.php?hello=hey and then can you make a php script that can get the request. Or you can use inbuilt variables like: /ht run http://mysite.com/mypage.php?player=%s&version=%ver.Tutorials
Variable examples here
Programming language here
Php examples here
Permission
* httptools.main - Access /ht* httptools.run - Access /ht run <url>
* httptools.varlist - Access /ht variables
Docs, getting started and tutorials: here!
If you don't have a website you can create scripts here!
I don't have many ideas for this so why not comment a idea?
Planned features (MAYBE ADDED)
* Loop - Loop lines many times* Goto - Goto lines
Sorry for no updates, im doing a big update with events, shortcuts, loops with more! Follow me on twitter if you want to know when the new update is coming!
Follow me on twitter!
HERE
The next update is pretty much done i have some small stuff todo but the thing is bukkit will not continue.
So why would i update it?
@wkera
Hello. I glad you liked my plugin its very motivating to keep updating the plugin and adding more stuff to it! Your idea with the shortcuts is very good! I will add it in the next version but it will take some time because the next update will be big!
Awesome plugin. It can help to make so many stuffs! But it's a littlebit unuserfull. For exaple to send data to my script i need write somthing like /ht run http://site.com/script?hello=world&player=%s It's a little bit problem. So what about aliacces. For example we write at config
hello: 'http://site.com/script?hello=world&player=%s'
and, when use command /ht hello it's will be like /ht run http://site.com/script?hello=world&player=%s Thanks
@MineLab
Okey flat?
Please can you make so the player recieve the message that is displayed by the phpscript ?
@qwertyjl
Did you include any spaces in the command after the url? Maybe you are using a old Craftbukkit, install the newest one.
I get this error when running it from the console:
[16:44:20 WARN]: Unexpected exception while parsing console command "ht run http://***. *.*/.php?pc=%pc" org.bukkit.command.CommandException: Unhandled exception executing command 'ht' in plugin HttpTools v0.1 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:175) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:683) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchServerCommand(CraftServer.java:670) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.DedicatedServer.aw(DedicatedServer.java:286) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:251) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] Caused by: java.lang.IllegalArgumentException: n must be positive at java.util.Random.nextInt(Random.java:300) [?:1.7.0_51] at se.albin900.httptools.Run.RunUrl(Run.java:47) [?:?] at se.albin900.httptools.Httptools.onCommand(Httptools.java:74) [?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [minecraft_server.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] ... 8 more
This error doesn't happen when I run it by hand.
@Patfreeze
Do you mean that i can make a page with a php example?
@pookshuman
Thanks for the response!
Check out the new docs: here
I think this plugin is to call a web page and make some treament in the back on a website.
/ht run http://mysite.com/mypage.(php, asp, htm)?player=%s&version=%ver
VARIABLE IN RED can be read like you have submited a web form to a page with the method GET.
This plugin suggest that you put some information on a web page with a simple request HTTP. If I am wrong Albin900, sorry ! =)
Maybe you could explain a bit more what this can do? Especially for those of us that don't speak php