SlayerFRA
New Member
- Sep 22, 2019
- 7
- 0
Hello,
3 hours ago that I search a way to send RCON/MUS command with PHP,
I think my PHP code is clean & good but the RCON/MUS does'nt work, any ideas/fix's? ://
Here is my PHP code:
3 hours ago that I search a way to send RCON/MUS command with PHP,
I think my PHP code is clean & good but the RCON/MUS does'nt work, any ideas/fix's? ://
Here is my PHP code:
PHP:
<?php
require_once('./global.php');
function RCON($header, $data = '') {
$musData = $header . chr(1) . $data;
$sock = @socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));
@socket_connect($sock, '127.0.0.1', '301');
@socket_send($sock, $musData, strlen($musData), MSG_DONTROUTE);
@socket_close($sock);
}
RCON('hotel_alert', 'yolo');
?>