decode($body); self::log($data, 'MsgForwardServer', self::$LOG_MAJOR); return false; } /** * 解析装载的数据 * @param $body * @return array * User: Mead */ private function decode($body) { $i = 0; $box_no = self::stitching($body, $i, 5); $i += 5; // 短信发送者的号码 $mobile = self::stitching($body, $i, 10); $i += 10; // 短信内容 $body = self::stitching($body, $i, false); // 处理值 $box_no = $this->decodeBoxNo($box_no); return [ 'box_no' => $box_no, 'mobile' => $mobile, 'body' => $body ]; } }