PHP code example of shubhank008 / php-utorrent
1. Go to this page and download the library: Download shubhank008/php-utorrent 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/ */
shubhank008 / php-utorrent example snippets
ache\Adapter\Void\VoidCachePool;
use Pbxg33k\UtorrentClient\UtorrentClient;
$client = new UtorrentClient('127.0.0.1', 8080, 'admin', 'password', '/gui/');
$client->setCache(new VoidCachePool());
$list = $client->getTorrents();
foreach ($list->getTorrents() as $torrent) {
echo $torrent->getHash() . ' ' . $torrent->getName() . PHP_EOL;
}
bash
composer