65,14 → 65,7 |
$url = 'https://polyfill.io/v3/polyfill.js?features='.urlencode(implode(',',REQUIRED_POLYFILLS)); |
} |
|
$opts = [ |
"http" => [ |
"method" => "GET", |
"header" => "User-Agent: ".$ua."\r\n" |
] |
]; |
$context = stream_context_create($opts); |
$cont = @file_get_contents($url, false, $context); |
$cont = url_get_contents($url, $ua); |
|
if ($cont === false) { |
|
83,7 → 76,7 |
// Instead, try again after the next max cache age |
touch($cache_file); |
} else { |
$out = '/* ERROR: polyfill.io not available and no cache file exists! */'; |
$out = '/* ERROR: polyfill.io ('.$url.') not available and no cache file exists! */'; |
httpOutWithETag($out, 'application/javascript', 'polyfill'.(MINIFY_POLYFILL ? '.min' : '').'.js'); |
} |
|