1. Go to this page and download the library: Download maestroerror/wget-download library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
maestroerror / wget-download example snippets
// Construct with parameteres array
$conf = [
"filename" => "/Home/Downloads/newFileName.mp4",
"folder" => "YOUR FOLDER",
"url" => "YOUR URL"
];
$file = new maestroerror\wgd($conf);
// Construct with URL only
$url = "YOUR URL";
$file = new maestroerror\wgd($url);
// Construct without parameters
$file = new maestroerror\wgd();
$file->folder("YOUR FOLDER")->name("/Home/Downloads/newFileName.mp4")->url("YOUR URL");