🍻 鉴黄接口增加请求超时时间:30秒

This commit is contained in:
Wisp X
2019-04-30 11:49:51 +08:00
parent b887ab3d6f
commit fb2b3d5e47
+1 -1
View File
@@ -101,7 +101,7 @@ class Upload extends Base
// 图片鉴黄
$suspicious = 0;
if ($this->config['open_audit']) {
$client = new Client();
$client = new Client(['timeout' => 30.00]);
$response = $client->get("https://www.moderatecontent.com/api/v2?key={$this->config['audit_key']}&url={$url}");
if (200 == $response->getStatusCode()) {
$result = json_decode($response->getBody()->getContents());