修复get_curl方法header错误

This commit is contained in:
耗子 2025-06-09 05:12:06 +08:00
parent 904c3ceb5b
commit 8193ade02d
No known key found for this signature in database
GPG Key ID: C964D7226D045DAA
3 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ class Ucloud
$param = array_merge($param, $params);
$param['Signature'] = $this->ucloudSignature($param);
$ua = sprintf("PHP/%s PHP-SDK/%s", phpversion(), self::VERSION);
$response = get_curl($this->ApiUrl, json_encode($param), 0, 0, $ua, 0, ['Content-Type: application/json']);
$response = get_curl($this->ApiUrl, json_encode($param), 0, 0, $ua, 0, ['Content-Type' => 'application/json']);
$result = json_decode($response, true);
if (isset($result['RetCode']) && $result['RetCode'] == 0) {
return $result;

View File

@ -57,7 +57,7 @@ class OptimizeService
'key' => config_get('optimize_ip_key', 'o1zrmHAF'),
'type' => $ip_type,
];
$response = get_curl($url, json_encode($params), 0, 0, 0, 0, ['Content-Type: application/json; charset=UTF-8']);
$response = get_curl($url, json_encode($params), 0, 0, 0, 0, ['Content-Type' => 'application/json; charset=UTF-8']);
$arr = json_decode($response, true);
if (isset($arr['code']) && $arr['code'] == 200) {
return $arr['info'];

View File

@ -220,7 +220,7 @@ class MsgNotice
if (!$wechat_apptoken || !$wechat_appuid) return false;
$url = 'https://wxpusher.zjiecode.com/api/send/message';
$post = ['appToken' => $wechat_apptoken, 'content' => $content, 'summary' => $title, 'contentType' => 3, 'uids' => [$wechat_appuid]];
$result = get_curl($url, json_encode($post), 0, 0, 0, 0, ['Content-Type: application/json; charset=UTF-8']);
$result = get_curl($url, json_encode($post), 0, 0, 0, 0, ['Content-Type' => 'application/json; charset=UTF-8']);
$arr = json_decode($result, true);
if (isset($arr['success']) && $arr['success'] == true) {
return true;
@ -284,7 +284,7 @@ class MsgNotice
} else {
return '不支持的Webhook地址';
}
$result = get_curl($url, json_encode($post), 0, 0, 0, 0, ['Content-Type: application/json; charset=UTF-8']);
$result = get_curl($url, json_encode($post), 0, 0, 0, 0, ['Content-Type' => 'application/json; charset=UTF-8']);
$arr = json_decode($result, true);
if (isset($arr['errcode']) && $arr['errcode'] == 0 || isset($arr['code']) && $arr['code'] == 0) {
return true;