This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
<?php function console($command) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://127.0.0.1:8765/console?command=$command"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output=curl_exec($ch); curl_close($ch); return $output; } /* TO USE echo console('YOUR COMMAND HERE'); echo console('list'); echo console('broadcast The Webserver says HI!'); or $output=console('list'); */ ?>
just a quick note: $command needs to be urlencoded so under
function console($command) {
add
$command=urlencode($command);
The page loads a bit then just freezes when I run this
Colors do not seem to work when you urlencode, the command itself does not work when you do not urlencode. Any way to handle this via HTTPConsole's end? Or am I missing something here?
from looking at this php code, i can just visit http://randomservername:8765/console?command=op robrobk and i will become op
can you add a whitelist feature so that only my website can send commands to my server?
@robrobk sorry, i just looked at config.yml and saw the whitelist there
just a quick note: $command needs to be urlencoded so under
add
The page loads a bit then just freezes when I run this
Colors do not seem to work when you urlencode, the command itself does not work when you do not urlencode. Any way to handle this via HTTPConsole's end? Or am I missing something here?
from looking at this php code, i can just visit http://randomservername:8765/console?command=op robrobk and i will become op
can you add a whitelist feature so that only my website can send commands to my server?
@robrobk sorry, i just looked at config.yml and saw the whitelist there