Plugin Helpers: Follow redirects on downloads

Some authors have listed a plugin URL that is subject to redirection
This commit is contained in:
Squidly271
2019-09-14 19:30:06 -04:00
committed by GitHub
parent dda07223a1
commit a62e63f74d

View File

@@ -22,6 +22,7 @@ function download_url($url, $path = "") {
curl_setopt($ch,CURLOPT_TIMEOUT,45);
curl_setopt($ch,CURLOPT_ENCODING,"");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$out = curl_exec($ch);
curl_close($ch);
if ( $path )