Skip to content

JacerOmri/curl-axel

Repository files navigation

Packagist PHP from Packagist license

CurlAxel

🐘 PHP based download accelerator ⏬

Getting Started

This library is available as a composer package. Will add a standalone version with each release.

Prerequisites

You only need php (with curl and mbstring extensions) and composer.

Installing and using

Use composer to install it

composer require jaceromri/curl-axel

And use it

$c = CurlAxel\Factory::create()
    ->setUrl('http://ovh.net/files/1Mio.dat')
    ->setOutput'download.dat');

$c->download();

You can set an other way to handle chunk streams. For instance, there is an in memory chunk handler that would work well if you have issues accessing temp folder in your system

$c = CurlAxel\Factory::create('Memory')
    ->setUrl('http://ovh.net/files/1Mio.dat')
    ->setOutput'download.dat');

$c->download();

Running the tests

use phpunit against tests folder

./vendor/bin/phpunit --bootstrap vendor/autoload.php tests

Coding style tests

use phpcs against src folder

./vendor/bin/phpcs src

Roadmap

The primary goal for now is to get a good initial version of this lib

  • Better API
  • Fix code style
  • Add documentation
  • Better exception handling
  • Add server checks and fallback

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details