Default Changelist
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user