emuCommander v1.2 - Rewrite - New style - New Features
emuCommander v1.2
What is it?
emuCommander is written in PHP and uses JQuery to load the different sections of the page.
You can monitor and send RCON/MUS commands to your emulator.
Compatible with any emulator that uses RCON/MUS commands.
Whats new?
Added Allowed IP's as a security feature.
Code is completely rewritten. The code is nice and clean.
New look.
Do I need anything else to use it?
You need to have emuMonitor1.4 running on your server.
How do I use it?
First copy the files to your webserver / housekeeping.
Add your CMS's authentication to the files.
Open the config.php and change it to your likings.
important > Open the txtFiles folder and create a file with the RCON/Mus commands that your emulator supports (there are 3 example files in that folder).
Browse to the index.php and enjoy.
Configuration:
PHP Code:
<?php
//Is emuMonitor running? true / false.
$emuMonitor = true;
//Refresh interval for the monitor in seconds.
$emuMonitorRefreshRate = 10;
//The IP for your emulator.
$serverIP = "127.0.0.1";
//The post used for remote monitoring.
$remoteMonitorPort = "30032";
//Your emulators RCon/MUS port.
$serverRConPort = "30001";
//Text file with commands.
$commandFile = "RConCommands.txt";
//IP addresses that are allowed to use emuCommander
$allowedIPs = "127.0.0.1;";
?>
Example of some code. This code reads the commands file and generates the command buttons.
PHP Code:
<?php
session_start();
include ('classes/RConCommands.php');
$createButtons = new readCommands;
$labels = $createButtons->splitCommand($createButtons->commands[$_GET['id']]);
$title = array_shift($labels);
$output = '<div class="CommandLabel">'.$title.'</div>';
$output .= '<input class="inputFields" type="hidden" name="'.$title.'" id="'.$title.'" value="'.$title.'" />';
foreach($labels as $label)
{
$output .= '<div class="fieldLabel">'.$label.'</div>';
$output .= '<input class="inputFields" type="text" name="'.$label.'" id="'.$label.'" />';
}
$output .= '<input onclick="stringBuilder()" class="submit_button" type="submit" name="Send" id="Send" value="Send" />';
echo $output;
?>
PHP Code:
<?php
class readCommands
{
public $commands = array();
function __construct()
{
$this->readFile();
}
function readFile()
{
$file = fopen($_SESSION['config']['commandFile'],"r") or exit("Unable to open the commands file!");
while(!feof($file))
{
$this->commands[] = fgets($file);
}
fclose($file);
sort ($this->commands);
}
function createButtons()
{
$i = 0;
$output = "";
foreach ($this->commands as &$command)
{
$comman = explode(' ', $command);
$output .= '<div class="rconCommandButtons" onclick="loadCommand('.$i.')">'.$comman[0]. '</div>';
$i++;
}
return $output;
}
function splitCommand($command)
{
$params = explode(' ', $command);
return $params;
}
}
?>
Example commands file - The command buttons on the main screen are generated using this file.
PHP Code:
ha Message
hal url Message
alert Username Message
updatecredits Username
catarefresh
givebadge Username Badge
shutdown
ban Username time reason
unban UsernameOrIP
coins Username Amount
pixels Username Amount
crystals Username Amount
signout UserID
globalcredits Amount
massbadge Badge
Screenshot:
http://hubbahubba.no-ip.biz/downloads/screens/em2.png
Download:
Download
Please report bugs in this thread.
re: emuCommander v1.2 - Rewrite - New style - New Features
I use this right now, really useful Leenster!
re: emuCommander v1.2 - Rewrite - New style - New Features
Create a program that closes your emulator at 02:00 and opens at 07:00.
That would be very nice!
re: emuCommander v1.2 - Rewrite - New style - New Features
hmm. Looks neat. Probably usefull for people around here ;3
~tdid
re: emuCommander v1.2 - Rewrite - New style - New Features
I added a setting in the config where you can state if you are using the emuMonitor or not. That way people that don't use the monitor can also use this. This will be available when i release the next update.
re: emuCommander v1.2 - Rewrite - New style - New Features
Wheres my credits for idea???/// loljk, amazing brah
re: emuCommander v1.2 - Rewrite - New style - New Features
Quote:
Originally Posted by
Livar
Wheres my credits for idea???/// loljk, amazing brah
Lol, yeah ur right. It was you fault that I did all that work....
re: emuCommander v1.2 - Rewrite - New style - New Features
Thanks Leenster, Was waiting for this release,
Sweet :3
re: emuCommander v1.2 - Rewrite - New style - New Features
Quote:
Originally Posted by
leenster
Lol, yeah ur right. It was you fault that I did all that work....
Still, i'm amazing.
re: emuCommander v1.2 - Rewrite - New style - New Features
I asked n0minal to do the styling on 1.2 so it's probably going to be pretty sweet.
There are only a few other changes in 1.2:
Cleaned up the code
Added a timer so the CPU and Memory usage are update automatically.
Added a setting in the config where you can choose if you want to use the app with or without the monitor.
Some other minor changes.
re: emuCommander v1.2 - Rewrite - New style - New Features
good work leenster :) did it works for r63b :D?
re: emuCommander v1.2 - Rewrite - New style - New Features
Quote:
Originally Posted by
Troll Hotel
good work leenster :) did it works for r63b :D?
This should work with pretty much any emulator.
re: emuCommander v1.2 - Rewrite - New style - New Features
i have no errors but nothing happens in my hotel if i test it :(
re: emuCommander v1.2 - Rewrite - New style - New Features
Quote:
Originally Posted by
Troll Hotel
hmm okay but when I try it nothing happens in my hotel? i have this error Warning: socket_recv() [
function.socket-recv
]: unable to read from socket [0]: De bewerking is voltooid. in C:\xampp\htdocs\admin\commander\app\rcon_connection.php on line 11
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\admin\commander\app\rcon_connection.php:11) in C:\xampp\htdocs\admin\commander\monitor.php on line 25
I think my configurations is incorrect,
Make sure php_sockets is enabled in your php.ini
re: emuCommander v1.2 - Rewrite - New style - New Features
Are you going to create a program that closes a Hotel at a special time, like Habbo?