bohan/aria2

This package is abandoned and no longer maintained. The author suggests using the manyou/aria2 package instead.

Aria2 JSON-RPC Client

v1.1.0 2022-01-16 06:22 UTC

This package is auto-updated.

Last update: 2022-11-08 07:55:08 UTC


README

composer require bohan/aria2

This library uses symfony/http-client.

An exception will be thrown if an error occurred.

<?php

declare(strict_types=1);

use Bohan\Aria2\Aria2;

$aria2 = new Aria2('http://localhost:6800/jsonrpc', 'rpc-secret');

$aria2->request('addUri', [
    ['https://example.com/'],
    ['out' => 'index.html']
]);

// or use the "__call" magic method
$aria2->addUri(
    ['https://example.com/'],
    ['out' => 'index.html']
);