
Originally Posted by
haaan
I am using Phoenix emulator.
Read those threads/posts:
http://forum.ragezone.com/f353/phoen...0-mus-1029914/
http://forum.ragezone.com/f333/phoen...2/#post7714572
On the first thread, you can see this: http://pastebin.com/t90mg25q
It is an simple script to connect with your Emulator using RCON (or MUS if you preffer to call like that, even being wrong).
Example for sending a HA (as seen on http://pastebin.com/t90mg25q , but with full form, and 'hal'):
PHP Code:
<?php
function Mus($header, $data = '')
{
$port = 30001;
$ip = "127.0.0.1";
$musData = $header . chr(1) . $data;
$sock = [MENTION=1333431411]Socket[/MENTION]_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));
[MENTION=1333431411]Socket[/MENTION]_connect($sock, $ip, intval($port));
[MENTION=1333431411]Socket[/MENTION]_send($sock, $musData, strlen($musData), MSG_DONTROUTE);
[MENTION=1333431411]Socket[/MENTION]_close($sock);
}
Mus("ha", "your message");
?>
Command List/Params (as seen on http://forum.ragezone.com/f333/phoen...2/#post7714572 ):
PHP Code:
unloadroom [id]
updategroup [id]
updatepixels [id]
updatepoints [id]
giveitem [userid] [itemid] [pageid] [gift-message]
updatevip [id]
updateusersgroups [id]
shutdown
update_filter
updatecredits [id]
reloadbans
update_bots
signout [id]
exe [SQL]
alert [id] [message]
ha [message]
hal [url] [message]
updatelook [id]
updatemotto [id]
update_items
update_catalogue
update_catalog
updateusersrooms [id]
senduser [userid] [roomid]
roomalert [id] [message]
update_filter
refresh_filter
sa [message]
I can't tell for sure if those works.
Basically is the same as running a command.
Example:
So, you'd run:
Code:
<?php
function Mus($header, $data = '')
{
$ip = "127.0.0.1"; // ip of your emulator
$port = 30001; // port of your emulator
$musData = $header . chr(1) . $data;
$sock = @Socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));
@Socket_connect($sock, $ip, intval($port));
@Socket_send($sock, $musData, strlen($musData), MSG_DONTROUTE);
@Socket_close($sock);
}
Mus("sa", "Hello Staffs!");
?>
As you can see, running
Code:
Mus("sa", "Hello Staffs!");
Will be the exact the same as :sa Hello Staffs!
PS: Do not use :command, instead use command (Don't use :, only the command trigger)
PS²: Not all commands are avaliable, so please, use the ones provided by @Vrop93 up there