From e5cdb50e0ef810bdac48e7556fba04188e0d88fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E9=9B=B6?= Date: Thu, 1 Dec 2022 12:59:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=8A=93=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/file.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/file.php b/include/file.php index 0db186e..4e8cd6f 100644 --- a/include/file.php +++ b/include/file.php @@ -43,6 +43,8 @@ function download_img($url,$referer="") { curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_ENCODING,'gzip'); curl_setopt($ch, CURLOPT_POST, 0); + curl_setopt($ch, CURLOPT_MAXREDIRS,5); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); if(!empty($referer)){curl_setopt($ch, CURLOPT_REFERER,$referer);} curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_TIMEOUT, 10);