Download the PHP package fatkulnurk/torrent without Composer

On this page you can find all versions of the php package fatkulnurk/torrent. 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 torrent

fatkulnurk/torrent

Latest release

Unified PHP SDK for torrent clients — one API for qBittorrent, Transmission, rTorrent, Deluge, rqbit, aria2, and Porla.

Add magnets or .torrent files, list progress, pause/resume, remove torrents, and read server version from PHP automation, seedbox tools, or web dashboards.

Requires PHP 8.3+ and Guzzle 7.

Table of Contents

Features

Install

Quick Start

All drivers are created the same way:

qBittorrent

Auth is required. This package targets the qBittorrent 5.x WebUI API (pause/resume use /torrents/stop and /torrents/start).

Transmission

Auth is optional (depends on server config). Uses legacy Transmission RPC (torrent-add, kebab-case fields) compatible with 4.x.

rTorrent

No authentication. XML-RPC over HTTP (SCGI proxy).

rpc_endpoint defaults to RPC2. Use / when the SCGI gateway serves XML-RPC at the root (e.g. port 8000 on the crazymax/rtorrent-rutorrent image used in this repo’s Docker stack).

Deluge

Web UI JSON-RPC; password required.

rqbit

No auth by default. REST API. setDownloadPath is not supported (throws RequestException).

aria2

Optional RPC secret token. Magnets and HTTP(S) URLs use addUri; base64 .torrent uses addTorrent.

Porla

Porla uses JSON-RPC at /api/v1/jsonrpc with optional JWT bearer auth. Prefer setting a default save_path (required by torrents.add unless a preset supplies one). Production should use a JWT from porla auth:token; Docker integration in this repo disables auth for local testing only.

Methods

Method Description
addTorrent(string $source, array $options = []) Add magnet, URL (where supported), or base64-encoded .torrent
getTorrents(array $filters = []) List torrents as Torrent[]
getTorrent(string $hash) Single torrent details
pauseTorrent(string $hash) Pause / stop
resumeTorrent(string $hash) Resume / start
removeTorrent(string $hash, bool $deleteFiles = false) Remove torrent; $deleteFiles is best-effort (rTorrent/aria2 may not wipe data via RPC)
setDownloadPath(string $hash, string $path) Change download directory (not supported on rqbit)
getServerStatus() ServerStatus with version info when the client exposes it

Torrent data

Every list/get call returns a readonly Fatkulnurk\Torrent\Data\Torrent:

Property Type Meaning
hash string Info-hash or client id (aria2 uses GID)
name string Display name
status int Coarse, provider-normalized state (see below)
totalSize int Total size in bytes
leftUntilDone int Bytes remaining
downloadDir string Download / save path
percentDone float Progress 0.0–1.0

status is not a global enum. Rough guide:

Value Typical meaning
0 Paused / stopped / unknown
1 Downloading / queued / initializing
2 Seeding / uploading / active
3 Complete (aria2)
4 Error
5 Removed (aria2)

Native status codes still differ per client; use this field as a coarse UI signal.

Driver status

Method qBittorrent Transmission rTorrent Deluge rqbit aria2 Porla
addTorrent ✅ ✅ ✅ ✅ ✅ ✅ ✅
getTorrents ✅ ✅ ✅ ✅ ✅ ✅ ✅
getTorrent ✅ ✅ ✅ ✅ ✅ ✅ ✅
pauseTorrent ✅ ✅ ✅ ✅ ✅ ✅ ✅
resumeTorrent ✅ ✅ ✅ ✅ ✅ ✅ ✅
removeTorrent ✅ ✅ ✅ ✅ ✅ ✅ ✅
setDownloadPath ✅ ✅ ✅ ✅ ❌ ✅ ✅
getServerStatus ✅ ✅ ✅ ✅ ✅ ✅ ✅
Icon Meaning
✅ Supported
❌ Not available on that client (throws RequestException)

Drivers

Driver Class Protocol Auth Typical port Client Website
qbittorrent QbittorrentProvider REST (cookie session) username + password 8080 qbittorrent.org
transmission TransmissionProvider JSON-RPC username + password (optional) 9091 transmissionbt.com
rtorrent RTorrentProvider XML-RPC none 8000 (RPC proxy) github.com/rakshasa/rtorrent
deluge DelugeProvider JSON-RPC (Web UI) password 8112 deluge-torrent.org
rqbit RqbitProvider REST none by default 3030 github.com/ikatson/rqbit
aria2 Aria2Provider JSON-RPC secret token (optional) 6800 aria2.github.io
porla PorlaProvider JSON-RPC (/api/v1/jsonrpc) JWT bearer (optional if auth disabled) 1337 porla.org

Testing

Unit tests

No external services:

Integration tests

Against real clients via Docker Compose:

make test-integration starts containers, reads the temporary qBittorrent 5.x password from logs, and runs the suite against all seven services.

Manual run:

Docker services used by this repo:

Service Image / build Version URL Auth Client Website
qBittorrent lscr.io/linuxserver/qbittorrent 5.2.0 http://localhost:8080 admin + session temp password qbittorrent.org
Transmission lscr.io/linuxserver/transmission 4.1.1 http://localhost:9091 admin / admin transmissionbt.com
rTorrent docker/rtorrent (crazymax-based) 0.16.7 http://localhost:8000 (RPC), :8081 (UI) none rakshasa/rtorrent
Deluge lscr.io/linuxserver/deluge 2.1.1 http://localhost:8112 password deluge deluge-torrent.org
rqbit ikatson/rqbit 9.0.0-beta.1 http://localhost:3030 none ikatson/rqbit
aria2 docker/aria2 1.37.0 http://localhost:6800 secret secret123 aria2.github.io
Porla ghcr.io/porla/porla 0.41.0 http://localhost:1337 auth disabled in compose (PORLA_HTTP_AUTH_DISABLED_YES_REALLY); use JWT in production porla.org

qBittorrent 5.x temporary passwords change on container restart. Use make test-integration or make qb-password.

Custom driver

AI / LLM Agents

If you are using an AI coding assistant, autonomous agent, or LLM (e.g. Claude Code, Cursor, OpenCode, GitHub Copilot) to contribute to or integrate this repository, refer to the full agent operational guide in AGENTS.md.

Quick Agent Reference

License

MIT — see LICENSE.


All versions of torrent with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
guzzlehttp/guzzle Version ^7.8
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 fatkulnurk/torrent contains the following files

Loading the files please wait ...