api文档中,修改系统和vnc密码问题 待解决

抱紧悦悦 4月前 335

api文档中,修改系统和vnc密码,显示时间戳异常


php代码如下:

 $timems=time();
        $rand = $this->GetRandStr(6);
        $data['timeStamp'] = $timems;
        $data['randomStr'] =$rand; 
        $data['token'] = 'token';    //token 自行配置的令牌,不清楚可看概述章节。
        sort($data,SORT_STRING);
        $str = implode($data);
        $signature = md5($str);
        $signature = strtoupper($signature);   
        $time=date("Y-m-d h:i:s", strtotime("+1 months"));
        $data = [
            'id' => '41',
            'type'=>'system',
            'password'=>'1245563',
            'time'=>$timems,
            'random'=>$rand,
            'signature'=>$signature
        ];

这是调用put请求

 $curl->doPut($data);
        $res = $curl -> getResponseBody();
        return $res;

提示

{code: 1, message: "时间戳异常"}

求解答

最新回复 (0)
返回
发新帖