function encode($msgType, $timeStamp, $body) {
return "\xFF\xFF".pack('CNn', $msgType, $timeStamp, strlen($body)).$body;
}
$connection->send(encode(1, time(), 'reqLoginAlarm;user=xxx;key=xxx;type=xxx'));
php 对接 北向数据接口 socket
于 2022-01-04 16:27:05 首次发布