where('id', $appid); $apirow = $db->getone($csql); $apisecret = $apirow['apisecret']; $param['appid'] = $appid; $signstr = ''; ksort($param); foreach ($param as $key => $value) { if ($key == 'sign') continue; $signstr .= $key . '=' . $value . '&'; } $signstr = substr($signstr, 0, -1); $signstr .= $apisecret; $hash = sha256($signstr); $param['hash'] = $hash; $urlget = 'https://ciyon.local.ciy.cn/ajax/api/v1.' . $func; $http = new \ciy\http(); $http->request($urlget, json_encode($param)); $statcode = $http->get_statcode(); clog('test http status code: ' . $statcode); $result = $http->get_data(); clog($result); exit(); } static function sign($data) { $hashbin = hex2bin(sha256($data)); $prikey = <<