ho risolto con le curl, ho creato:
Codice PHP:
function leggiUrl($url){
    
$ch curl_init($url);
    
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
    
curl_setopt($chCURLOPT_BINARYTRANSFERtrue);
    
$content curl_exec($ch);
    
curl_close($ch);
    return 
$content;

così poi è bastato sostituire file_get_contents con leggiUrl