[C#] How to connect MUS Phoenix Socket :'(
Hello,
Anyone know how to connect to MUS Phoenix Socket ?
Please . Thank you :) :junglejane:
Re: [C#] How to connect MUS Phoenix Socket :'(
Connect what? In any languange you can just dump a command to the mus port.
Re: [C#] How to connect MUS Phoenix Socket :'(
With a little bit of using google:
Code:
<?php
function SendMUSData($header,$data=""){
$ip = $variable_from_the_config;
$port = $another_variable_from_the_config;
$data = $header.chr(1).$data;
if(!is_numeric($port)){ return false; }
$sock = socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));
socket_connect($sock, $ip, $port);
if(!is_resource($sock)){
return false;
} else {
socket_send($sock, $data, strlen($data), MSG_DONTROUTE);
//You can use socket_recv to get the response from the server.
//socket_recv($sock, $buf, 2048, MSG_WAITALL);
//echo $buf;
return true;
}
socket_close($sock);
}
?>
Quote:
Originally Posted by
Superfun
Connect what? In any languange you can just dump a command to the mus port.
He means by PHP ofc.
Re: [C#] How to connect MUS Phoenix Socket :'(
Quote:
Originally Posted by
HillBilly
With a little bit of using google:
Code:
<?php
function SendMUSData($header,$data=""){
$ip = $variable_from_the_config;
$port = $another_variable_from_the_config;
$data = $header.chr(1).$data;
if(!is_numeric($port)){ return false; }
$sock = socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));
socket_connect($sock, $ip, $port);
if(!is_resource($sock)){
return false;
} else {
socket_send($sock, $data, strlen($data), MSG_DONTROUTE);
//You can use socket_recv to get the response from the server.
//socket_recv($sock, $buf, 2048, MSG_WAITALL);
//echo $buf;
return true;
}
socket_close($sock);
}
?>
He means by PHP ofc.
Nothing of course about that, hell, the thread title has [C#]
Re: [C#] How to connect MUS Phoenix Socket :'(
Wahaha , NVM THanks for the code HillyBilly !