PHPackages                             maestroerror/wget-download - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. maestroerror/wget-download

ActiveLibrary

maestroerror/wget-download
==========================

easy to use, chainable PHP class for downloading files, uses wget CLI

1.0.1(4y ago)212[1 issues](https://github.com/MaestroError/wget-download/issues)MITPHPPHP &gt;=7.4

Since Jul 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/MaestroError/wget-download)[ Packagist](https://packagist.org/packages/maestroerror/wget-download)[ RSS](/packages/maestroerror-wget-download/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)DependenciesVersions (3)Used By (0)

wget-download
=============

[](#wget-download)

easy to use, chainable PHP class for downloading files, uses **wget** CLI

Docs
====

[](#docs)

I will try to provide some instructions, to better understand and use the main features of this little library.

- [Installation](#installation)
    - [Composer](#via-composer)
    - [From github](#from-github)
- [Initialization](#initialization-of-class-construction)
- [Options](#Options)
- [Logs](#logs)
- [Run](#run)

installation
------------

[](#installation)

#### via Composer:

[](#via-composer)

```
composer require maestroerror/wget-download

```

*Don't forget to require autoload.php file*

#### from github:

[](#from-github)

```
git clone https://github.com/MaestroError/wget-download.git

```

*Note: It needs **wget** command to be available from your terminal. Check with `wget --help` or install: Run `apt-get install wget` for linux or [download for windows](https://eternallybored.org/misc/wget/)*

Initialization of class (Construction)
--------------------------------------

[](#initialization-of-class-construction)

You can construct object with 3 different ways: with array of configs, with string of URL or without any parameters (and provide them further). Which you choose, it depends on your needs:

```
// 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");

```

Options
-------

[](#options)

set speed limit:

```
$file->speedLimit("500k");

```

enable continue after the interrupt, so if the internet connection stopped it will automatically resume the download after the connection is restored:

```
$file->continueIfStopped();

```

**$checkCertificate** is defined in wgd class as protected boolean property and by default it is set to *false*, you can use *secure* method, to allow **HTTPS** certificate check for specific downloads:

```
$file->secure();

```

By default silent (download in background) mode is enabled, but for some specific downloads you can specify conditions:

```
$file->silent();
$file->wait(); // Waits before downloaded

```

Sometimes you should use a user agent for download. first, you need to allow and after set user agent for your download:

```
$file->allowUserAgent()->userAgent($user_agent_string)

```

for multiple .txt downloads, you need .txt file with urls (line by line). Like in user agent case, first, allow multiple download with *multiple* method and then give .txt file to run:

```
$file->multiple()->file($filepath);

```

Logs
----

[](#logs)

default log file is defined as protected property in wgd class `protected string $logFile = "wgetlog.txt";`, but if you need, you can specify with *setLog* method:

```
$file->setLog("/Home/Downloads/newFileLog.txt");
$file->setLog("newFileLog.txt");

```

Run
---

[](#run)

The last step is an execution, you can start your download with *run* method: `$file->run()`.
Now let's say, we need to download file on background, with secure connection, set speed limit 1MB and allow continue:

```
$conf = [
    "filename" => "/Home/Downloads/newFileName.mp4",
    "folder" => "YOUR FOLDER",
    "url" => "YOUR URL"
];
$file = new maestroerror\wgd($conf);
$file->setLog("newFileLog.txt")->silent()->secure()->speedLimit("1m")->continueIfStopped()->run()

```

---

### To Do

[](#to-do)

- Search for todo comments and fix them
- Add more use cases in examples
- Add config files
- Update documentation
- New release

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1768d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9b3015d66e88ffcecb330b381383fc9e343dbe1deffc3b62cff21d569901f17e?d=identicon)[maestroerror](/maintainers/maestroerror)

---

Top Contributors

[![MaestroError](https://avatars.githubusercontent.com/u/46760939?v=4)](https://github.com/MaestroError "MaestroError (20 commits)")

### Embed Badge

![Health badge](/badges/maestroerror-wget-download/health.svg)

```
[![Health](https://phpackages.com/badges/maestroerror-wget-download/health.svg)](https://phpackages.com/packages/maestroerror-wget-download)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
