优化日志记录方式

This commit is contained in:
iyuu.cn
2020-08-05 19:07:53 +08:00
parent b046ecc75f
commit 463e45ee38
2 changed files with 73 additions and 60 deletions

View File

@ -618,6 +618,10 @@ class transmission extends AbstractClient
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->url);
if (stripos($this->url, 'https://') === 0) {
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // 禁止验证证书
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); // 不检查证书
}
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, $this->username . ':' . $this->password);