urlToId($url); if(file_exists(Settings::$CachePath . $id . ".part")){ return false; } $speed = Settings::$CacheDownloadMaxSpeed; $r = ""; if($speed){ $r = " -r $speed "; } $command = Settings::$YoutubeDlCommand . " $r -o '" . Settings::$CachePath . "$id" . "' $url"; $output = exec($command); echo "$output"; } }