client = new Testess("ws://192.168.115.65:8090/ws"); $this->client->send($msg); $this->client->close(); return null; } } function enviaActions($msg, $tipo, $matricula = null, $uniqueid = null) { try { $mensagem = []; $mensagem["event"] = [ "type" => 'actions', "contact" => [ "name" => 'Sistema', "number" => '0' ], "mensagem" => [ "type" => utf8_encode($tipo), "dst" => utf8_encode($matricula), "uniqueid" => utf8_encode($uniqueid), "content" => utf8_encode($msg) ], ]; return json_encode($mensagem); } catch (\Exception $th) { logger('monitora')->info($th->getMessage(), debug_backtrace()); } } }