Made it cope with gzip encoded content
This commit is contained in:
parent
3a720a90ac
commit
8cf8c416ed
1 changed files with 2 additions and 0 deletions
|
@ -16,6 +16,8 @@ function getfc($url,$timeout,$headers=[]) {
|
|||
$headers_sz=curl_getinfo($curli,CURLINFO_HEADER_SIZE);
|
||||
$headers=substr($cont,0,$headers_sz);
|
||||
$cont=substr($cont,$headers_sz);
|
||||
if (preg_match('/^Content-Encoding: gzip/m',$headers)===1)
|
||||
$cont=gzdecode($cont);
|
||||
$emsg=false;
|
||||
$cerrno=curl_errno($curli);
|
||||
if ($cerrno>0) {
|
||||
|
|
Loading…
Reference in a new issue