我叫 chatGPT 帮我写了个 php 获取 这个 json 如果 traces 条目增加了就显示 new trace 并记录 trace 条目数量以备下次对比. 用 Uptime Kuma 每 300 秒访问这个 php ,如果关键字出现 new trace ,就推消息。
请问有更优雅的方式推送消息或者发邮件通知吗?
{
"status": 1,
"info": "",
"action": "",
"show_time": 1,
"data": {
"shipment": {
"shipment_id": "JH0OOOOOOOOOO",
"client_reference": "CX2024000000CN",
"ext_number": "",
"outer_carrier_code": "DHL",
"outer_carrier_tracking_number": "1045000000",
"status": "ready",
"country": "法国",
"postcode": "10000",
"traces": [
{
"time": "2024-03-10 10:10:10",
"info": "已下单"
}
]
}
},
"grid_view_reload": 0,
"request_time": "2024-03-20 23:00:01"
}