Download the PHP package daijie/aria2 without Composer

On this page you can find all versions of the php package daijie/aria2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package aria2

php-aria2

Talking with aria2 through JSON-RPC

  1. Install
  2. Class Aria2
    1. Usage
    2. Batch Requests
    3. System Methods
    4. Example #1: Download File
    5. Example #2: The Returned Data
      1. Can't Download
      2. Downloading (Active)
      3. Downloaded
  3. Docker Playground
  4. Updates
  5. Contributors

Install

1. Install aria2c

Make sure aria2c is running and rpc is enabled, You can add this into /etc/rc.local /usr/local/bin/aria2c --enable-rpc --rpc-allow-origin-all -c -D

Also See The Document of Aria2

2. Require Aria2.php

The codes just 82 lines but support all RPC methods. Using php's magic method __call

2.1 Install by composer

composer require daijie/aria2

2.2 Or copy Aria2.php

Class Aria2

Usage

Also See Manual of Aria2 RPC Interface To Get The Method List

.i.e, It's the example from Aria2 manual wrote in Python:

If you are using php with php-aria2:

Batch requests

Now php-aria2 support JSON-RPC 2.0 Specification Batch requests In v1.2.0 batch requests have been introduced.

Another ways is anonymous function, it also support method chaining. Don't forget commit.

System methods

There are some system methods, you can call it using

php-aria2 convert _ to . automatically. If method name without a _, php-aria2 will auto prepend a aria2.

Example #1: Download File

More Options Here

Example #2: The Returned Data

Case: Can't Download

Case: Downloading (Active)

Case: Downloaded

Docker Playground

require docker-compose

Docker playground: nginx (17 MB) + php7-fpm (82 MB) + aria2c (6 MB)

init playground

then open another terminal and enter playground

for China user we suggest use the phpcomposer mirror

After that, the playground structure:

Edit www/index.php and Open Browser To Visit http://127.0.0.1:8080

Updates

v1.2.1b

v1.2.0b

v1.1

Now support default token(secret) in php-aria2, compatible with v1.0

Before

After

Contributors


All versions of aria2 with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package daijie/aria2 contains the following files

Loading the files please wait ....