|
|
@@ -23,13 +23,13 @@ class ReceivedSms extends RestfulController
|
|
|
foreach ($data as $datum) {
|
|
|
$pat = "#\[(.*)\]-\[IP.*\[操作:(.*)\]#iUs";
|
|
|
preg_match($pat, $datum, $arr);
|
|
|
- if ($arr[1]) {
|
|
|
- $temp = explode("$$$", $arr[1]);
|
|
|
+ if ($arr) {
|
|
|
+ $temp = explode("$$$", $arr[2]);
|
|
|
$result[] = [
|
|
|
'from' => $temp[1],
|
|
|
'to' => $temp[2],
|
|
|
'msg' => $temp[0],
|
|
|
- 'time' => $arr[0]
|
|
|
+ 'time' => $arr[1]
|
|
|
];
|
|
|
}
|
|
|
|