Default Changelist

This commit is contained in:
xl
2023-11-07 15:13:11 +08:00
parent dbdae7c6c5
commit 43f504b2ad
23 changed files with 832 additions and 624 deletions
+15
View File
@@ -36,6 +36,11 @@ class SecCheck extends SmallProgram
$client = new Client('api.weixin.qq.com', 443, true);
$client->withHeader(['Content-Type' => 'multipart/form-data']);
$proxyHost = $this->getConfig()->getProxyHost();
$proxyPort = $this->getConfig()->getProxyPort();
if (!empty($proxyHost) && $proxyPort > 0) {
$client->withProxyHost($proxyHost)->withProxyPort($proxyPort);
}
$client->upload($this->_url . '?access_token=' . $access_token, [
'media' => new \CURLFile($path)
]);
@@ -66,6 +71,11 @@ class SecCheck extends SmallProgram
$requestUrl = $this->_mediaCheckAsync . $this->config->getAccessToken();
$client = new Client('api.weixin.qq.com', 443, true);
$client->withHeader(['Content-Type' => 'application/json']);
$proxyHost = $this->getConfig()->getProxyHost();
$proxyPort = $this->getConfig()->getProxyPort();
if (!empty($proxyHost) && $proxyPort > 0) {
$client->withProxyHost($proxyHost)->withProxyPort($proxyPort);
}
$client->post($requestUrl, ['media_url' => $url, 'media_type' => $type]);
$client->close();
@@ -104,6 +114,11 @@ class SecCheck extends SmallProgram
$client = new Client('api.weixin.qq.com', 443, true);
$client->withHeader(['Content-Type' => 'application/json']);
$proxyHost = $this->getConfig()->getProxyHost();
$proxyPort = $this->getConfig()->getProxyPort();
if (!empty($proxyHost) && $proxyPort > 0) {
$client->withProxyHost($proxyHost)->withProxyPort($proxyPort);
}
$client->post($requestUrl, ['content' => $content]);
$client->close();