Meine Codes erreicht ist:file_get_contents, failed to open stream: Umleitungs Limit
if (isset($_POST['gd_url']) && isset($_POST['accessToken'])) {
$url = "https://drive.google.com/uc?export=download&id=".$fileId;
// $url = $_POST['gd_url'];
$name = $_POST['file'];
$accessToken = $_POST['accessToken'];
$opts = array(
'http'=>array(
'method'=>"GET",
'header' => "Authorization: Bearer " . $accessToken
)
);
$context = stream_context_create($opts);
$content = file_get_contents($url, false, $context);
// echo $content;
if (!empty($content)){
file_put_contents($_SERVER['DOCUMENT_ROOT'].'/UPDRIVE/'.$name,$content);
}
}
ich versuche hinzufügen 'follow_location' => false
und 'max_redirects' => 101
aber das gleiche Ergebnis
Fehler:
Warning: file_get_contents(https://drive.google.com/uc?export=download&id=0B6ijT2xI7CfebEt3d3g1dndtZlU): failed to open stream: Redirection limit reached, aborting in /.../uploadMediasSupdrive.php on line 24
wenn Ich ändere die Ligne
$content = file_get_contents($url, false, $context);
zu
$content = file_get_contents($url);
diese Arbeit nur mit * .jpg Datei
Danke