PHP code example of ndthuan / aria2-rpc-adapter
1. Go to this page and download the library: Download ndthuan/aria2-rpc-adapter 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/ */
ndthuan / aria2-rpc-adapter example snippets
nt = new \JsonRPC\Client('http://localhost:6800/jsonrpc');
$adapter = new \Ndthuan\Aria2RpcAdapter\Adapter($client);
print_r(
$adapter->getGlobalStat()
);
var_dump(
$adapter->addUri(
['http://google.com'],
['dir' => getenv('HOME') . '/Downloads']
)
);
print_r(
$adapter->tellActive()
);