http上线

This commit is contained in:
“wanyongkang”
2023-12-26 16:37:09 +08:00
parent e768fdf8e1
commit 95200f1c5a
13 changed files with 1269 additions and 3 deletions

View File

@@ -4,8 +4,8 @@
* @version:
* @Author: kangkang
* @Date: 2020-09-30 17:32:46
* @LastEditors: Please set LastEditors
* @LastEditTime: 2020-12-07 16:44:09
* @LastEditors: “wanyongkang” “937888580@qq.com”
* @LastEditTime: 2023-12-26 16:29:17
*/
/**
* 浏览器友好的变量输出
@@ -221,4 +221,26 @@ function getIp()
}
}
return ($ip);
}
//格式化http接口的请求函数
function formatHttpRequert($data){
//1001
//f031e77c3055ade88b1db389e85a973a
$time = time();
$data['appid'] = 1001;
$data['timestamp'] = $time;
ksort($data);
$http_request = http_build_query($data);
$http_request =str_replace("%2C", ",", $http_request);
$sign = md5($http_request.'f031e77c3055ade88b1db389e85a973a');
$data ['appid'] = '1001';
$data ['timestamp'] = $time;
$data ['sign'] = $sign;
return $data;
}