The software for torrent is rTorrent.
<?php
require '../3rdparty/php-rtorrent-client-master/vendor/autoload.php';
$client = new \PHPRtorrentClient\Client([
'rpc_address' => "https://myuser:[email protected]:32491/RPC2",
]);
$request = new PHPRtorrentClient\Request("download_list");
$methods = $client->exec($request);
$torrents = $methods->getAll();
var_dump($torrents);
array(1) {
["download_list"]=> array(58) {
[0]=> string(40) "5AAEAAS44AAF97BF57BB24CA4FA4471AVF4A1F4F"
[1]=> string(40) "546AAAA41013ED213B6DFFZZDDFZ744157ZSAADA"
[2]=> string(40) "94774458AAA111AA7531BFAD46972666ED2D139A"
}
}
foreach ($client->getTorrents() AS $i => $torrent)
{
printf("%s: %s (%s), Running: %s, Label: %s\n", ($i + 1), $torrent->getName(), $torrent->getHash(), ($torrent->isActive() ? 'Yes' : 'No'), $torrent->getLabel());
}
Notice: Undefined offset: 0 in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Response.php on line 116
Notice: Undefined offset: 0 in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Response.php on line 130
Notice: Undefined index: getName in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 46
Notice: Undefined index: get_name in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 110
Notice: Undefined property via __call(): getName in /.../step1.php on line 43 in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 40
Notice: Undefined index: getHash in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 46
Notice: Undefined index: get_hash in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 110
Notice: Undefined property via __call(): getHash in /.../step1.php on line 43 in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 40
Notice: Undefined index: isActive in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 46
Notice: Undefined index: is_active in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 110
Notice: Undefined property via __call(): isActive in /.../step1.php on line 43 in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 40
Notice: Undefined index: getLabel in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 46
Warning: Illegal string offset 'get_custom1' in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 35
1: (), Running: No, Label: -
Notice: Undefined index: getName in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 46
Notice: Undefined index: get_name in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 110
Notice: Undefined property via __call(): getName in /.../step1.php on line 43 in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 40
Notice: Undefined index: getHash in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 46
Notice: Undefined index: get_hash in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 110
Notice: Undefined property via __call(): getHash in /.../step1.php on line 43 in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 40
Notice: Undefined index: isActive in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 46
Notice: Undefined index: is_active in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 110
Notice: Undefined property via __call(): isActive in /.../step1.php on line 43 in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 40
Notice: Undefined index: getLabel in /.../php-rtorrent-client-master/src/PHPRtorrentClient/Base.php on line 46