false]); $file = Utils::tryFopen($movieZipName, 'w'); try { $guzzle->request("get", $url, ['sink' => $file]); } catch (GuzzleException $e) { echo "Could not retrieve remote file. {$e->getCode()}: {$e->getMessage()}\n"; return null; } $zip = new ZipArchive(); $extractPath = "."; if ($zip->open($movieZipName) !== true) { echo "Could not open or find the zip file. Check your file system permissions."; } $zip->extractTo($extractPath); $zip->close(); return file_get_contents($movieFileName); }