mirror of
https://github.com/LyLme/lylme_spage.git
synced 2024-11-17 14:34:08 +08:00
优化 图片抓取
This commit is contained in:
parent
d3fe15bb6a
commit
e5cdb50e0e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user