I am using below script to get data from a website. data is return but it is in gzip or some encoded format. I tried to use gzdecode but it is not working on it. is there any way to see clean data from this request.
I use
curl_setopt($ch, CURLOPT_ENCODING , 'deflate');
curl_setopt($ch, CURLOPT_ENCODING , 'gzip');
curl_setopt($ch, CURLOPT_ENCODING , 'br');
but none of them is working. below is curl request
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_URL, 'https://www.example.com');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_ENCODING , 'deflate');
$response = curl_exec($ch);
$d = curl_getinfo( $ch );
curl_getinfo is showing below
I can see that site is using "br" encoding i.e Content-Encoding: br