0
I need to return a page that is on text/html, but is coded with zlib, yes I tried to decode but no chance, since the function zlib_decode, is not documented so I did searches but all unsuccessful, see the return:
'HTTP/1.1 200 OK
Content-Type: text/html
X-Frame-Options: SAMEORIGIN
Vary: Cookie, Accept-Language, Accept-Encoding
Cache-Control: private, no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: Sat, 01 Jan 2000 00:00:00 GMT
Content-Language: pt-br
Content-Encoding: gzip
Date: Wed, 03 Jan 2018 19:03:06 GMT
Strict-Transport-Security: max-age=86400
Set-Cookie: alguns cookies'... (length=5280)
And here is mine request
function challenge($url) {
$getCSRF = getCSRF();
$request = curl_init();
curl_setopt_array($request, array(
CURLOPT_URL => 'https://www.url.com/' . $url,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HEADER => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_COOKIE => $getCSRF->cookies,
CURLOPT_USERAGENT => $_SERVER['HTTP_USER_AGENT'],
CURLOPT_HTTPHEADER => array(
'accept-encoding:gzip, deflate, br',
'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'accept-language:pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7',
)
));
$response = curl_exec($request);
curl_close($request);
return $response;
}
var_dump(challenge('challenge/id/Fn0C4GsZjg/'));
Wouldn’t it be simpler to change the
accept-encoding
? Maybe the server is compressing because you asked for it yourself.– Bacco
@Bacco already suggested it to me and I can not do
– user94336