I recently wanted to fetch and decode API response from a web service. I thought that just just file_get_contents and then json_decode the resultin
you can use curl instead of file_get_contents and get page content without any encoding
function get_url($link){
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch,CURLOPT_ENCODING, '');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, ($link));
$response = curl_exec($ch);
curl_close($ch);
return ($response);
}