Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function send_MUS($command,$data)
- {
- if($this->mus_Enabled())
- {
- $data = $command . chr(1) . $data;
- $sock = socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));
- socket_connect($sock, parent::system_Settings('client_ip'), parent::system_Settings('client_mus_port'));
- if(!is_resource($sock))
- {
- socket_close($sock);
- die(parent::error_Handler('MUS Packet','HabbluxCMS was unable to send packets the server. Usually this happens when the server is down or the CMS is configured incorrectly.'));
- return false;
- }
- else
- {
- socket_send($sock, $data, strlen($data), MSG_DONTROUTE);
- socket_close($sock);
- return true;
- }
- }
- }
Add Comment
Please, Sign In to add comment