CODE_UNKNOW_ERROT, "code_msg"=> $msg, "app_id"=> 'dw_box', "server_ip"=> getAwsSeverIp() ?: '127.0.0.1', "alerm_type"=> 'ERROR', "time"=> time() ]; $appKey = 'a67362f15b13cf5df4ac695b39844c84'; $tmpArr = $data; $tmpArr['app_key'] = $appKey; sort($tmpArr, SORT_STRING); $tmpStr = implode($tmpArr); $signStr = sha1($tmpStr); $data['sign'] = $signStr; $header = 'Host: amc-admin.duowan.com'; $ret = (new dwHttp)->post($amc_url, $data, 5, $header); $ret = json_decode($ret, true); if ($ret['result']) { return true; } else { var_dump("【error】告警错误:" . $ret['msg']); return false; } }