PHPackages                             happydemon/transmission - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. happydemon/transmission

ActiveLibrary[HTTP &amp; Networking](/categories/http)

happydemon/transmission
=======================

A little helper for making calls to the Transmission Daemon RPC interface Edit

0.3(8y ago)018MITPHP

Since Aug 26Pushed 8y ago1 watchersCompare

[ Source](https://github.com/happyDemon/transmission)[ Packagist](https://packagist.org/packages/happydemon/transmission)[ RSS](/packages/happydemon-transmission/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (4)Used By (0)

Transmission
============

[](#transmission)

You can use this package to communicate with your transmission installation's web/RPC server.

You can set up transmission by going into preferences &gt; remote &gt; enable remote access.

This package was written against Transmission's [RPC spec](https://trac.transmissionbt.com/browser/branches/1.7x/doc/rpc-spec.txt), if you ever need more info on what each call does or what data it returns, that's the best place to start.

Installation
------------

[](#installation)

First you'll need to pull in the library

```
composer require happydemon/transmission
```

Short intro
-----------

[](#short-intro)

Next you'll need to set up the `Transmission` object.

```
$transmission = new \HappyDemon\Transmission\Transmission();
```

By not defining any config, the object will use sensible defaults to connect to transmission.

Let's retrieve the list of torrents we have in Transmission

```
var_dump($transmission->torrents()->get());
```

Config
------

[](#config)

When initialising a `Transmission` object you can pass an array with several config options;

**ssl** *boolean*

Is the transmission web server served over https?

**host** *string*

The host/IP the transmission web server is running on (defaults to 127.0.0.1).

**port** *string*

What port is the transmission web server running on (defaults to 9091).

**url** *string*

What endpoint is the transmission web server running on (defaults to /transmission/rpc).

**username** *string*

What username is used to authenticate? (empty by default)

**password** *string*

What password is used to authenticate? (empty by default)

Main torrent methods
--------------------

[](#main-torrent-methods)

#### Retrieving torrents

[](#retrieving-torrents)

Retrieves the list of torrents you see in transmission.

```
$transmission->torrents()->get();
```

This will always return an array with `HappyDemon\Services\Transmission\Torrents\Entity` objects. You can check out the class to see what properties are available to it.

You could also use it to retrieve a single or multiple torrents that you have the ID of:

```
// Get the torrent with id 1
$transmission->torrents()->get(1);

// Get a few torrents
$transmission->torrents()->get([1,6,12]);
```

### Adding torrents

[](#adding-torrents)

```
$torrent = $transmission->torrents()->addFromUrl($urlToTorrent);
$torrent = $transmission->torrents()->addFile($filePath);
$torrent = $transmission->torrents()->addFromBase64($fileBlob);
```

Using any of these methods will let you add new torrents. Each time it will return a `HappyDemon\Services\Transmission\Torrents\Entity` object. The catch is, only 3 properties will be set though: id, hashString &amp; name.

You can also add some extra options that would overwrite Transmission's own default settings:

```
$torrent = $transmission->torrents()->addFromUrl($urlToTorrent, ['uploadLimit' => 512]);
```

#### Setting defaults

[](#setting-defaults)

You could also overwrite Transmission's defaults 'globally'

```
$torrents = $transmission->torrents()->defaults(['uploadLimit' => 512]);

$torrent = $torrents->addFromUrl($urlToTorrent);
```

Torrent entity methods
----------------------

[](#torrent-entity-methods)

These are the methods that are available on a `HappyDemon\Services\Transmission\Torrents\Entity` object.

### Actions

[](#actions)

#### start

[](#start)

```
$torrent->start();
```

Starts the specific torrent.

#### stop

[](#stop)

```
$torrent->stop();
```

Stops the specific torrent.

#### verify

[](#verify)

```
$torrent->verify();
```

Verifies the specific torrent.

#### reannounce

[](#reannounce)

```
$torrent->announce();
```

Reannounces the specific torrent.

#### remove

[](#remove)

```
$torrent->remove();
```

Removes the specific torrent.

#### move

[](#move)

```
$torrent->move();
```

Moves the specific torrent to a different location on your file system.

#### update

[](#update)

Allows you to update some torrent-specific settings.

```
$torrent->settings($properties);
```

You could also update a singular torrent-setting like this:

```
// remove the download limit
$torrent->setDownloadLimited(false);
```

```
// set the bandwidth priority
$torrent->setBandwidthPriority(1);
```

```
// set the download limit (in K/s)
$torrent->setDownloadLimit(1024*3);
```

```
// Mark files as wanted
// Use an empty array for all files, use an array of ids to be more selective [0,2]
// In this case we only want to download the second file
$torrent->setFilesWanted([1]);
```

```
// Mark files as unwanted
// Use an empty array for all files, use an array of ids to be more selective [0,2]
// In this case we don't want to download the first file
$torrent->setFilesUnwanted([0]);
```

```
// true if session upload limits are honored
$torrent->setHonorsSessionLimits(true);
```

```
// Set a new directory for the torrent's contents
$torrent->setLocation('c:/downloads');
```

```
// Set the peer limit (max amount of peer)
$torrent->setPeerLimit(40);
```

```
// Set the priority for files to high
// Use en empty array to update priority for all files
// or use the file ids [0,2]
$torrent->setPriorityHigh([]);
```

```
// Set the priority for files to low
// Use en empty array to update priority for all files
// or use the file ids [0,2]
$torrent->setPriorityLow(false);
```

```
// Set the priority for files to normall
// Use en empty array to update priority for all files
// or use the file ids [0,2]
$torrent->setPriorityNormal(false);
```

```
// Set the seed ratio limit
$torrent->setSeedRatioLimit(1.2);
```

```
// Set the seed ratio mode
// 0 = global, 1 = see seedRatioLimit, 2 = unlimitted
$torrent->setSeedRatioMode(1);
```

```
// Change the upload limit (in K/s)
$torrent->setUploadLimit(512);
```

```
// Should the torrent's upload be limitted?
$torrent->setUploadLimited(false);
```

### Getters

[](#getters)

The entity has a lot of properties, however I've added a few getters for ease-of-use:

#### status

[](#status)

```
$torrent->status();
```

Will return the torrents status as a string, whereas `$torrent->status` only returns a number.

#### activityDate

[](#activitydate)

```
$torrent->activityDate();
```

Will return a `DateTime` object, representing the last time torrent activity happened

#### addedDate

[](#addeddate)

```
$torrent->addedDate();
```

Will return a `DateTime` object, representing the date/time the torrent was added.

#### doneDate

[](#donedate)

```
$torrent->doneDate();
```

Will return a `DateTime` object, representing time the torrent was completed.

#### percentDone

[](#percentdone)

```
$torrent->percentDone();
```

Will return the percentage that the torrent is completed whereas `$torrent->percentDone` would return this as a float.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

3230d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/91a724ec7e90c57050c6fa0fa34f9faeec7041896866d4f8ddc85ed00b0f8887?d=identicon)[happyDemon](/maintainers/happyDemon)

---

Top Contributors

[![bgMaxim](https://avatars.githubusercontent.com/u/27724661?v=4)](https://github.com/bgMaxim "bgMaxim (10 commits)")

---

Tags

rpctorrenttransmission

### Embed Badge

![Health badge](/badges/happydemon-transmission/health.svg)

```
[![Health](https://phpackages.com/badges/happydemon-transmission/health.svg)](https://phpackages.com/packages/happydemon-transmission)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[statamic/cms

The Statamic CMS Core Package

4.8k3.5M923](/packages/statamic-cms)[sunchayn/nimbus

A Laravel package providing an in-browser API client with automatic schema generation, live validation, and built-in authentication with a touch of Laravel-tailored magic for effortless API testing.

33437.0k](/packages/sunchayn-nimbus)[imdhemy/google-play-billing

Google Play Billing

491.4M5](/packages/imdhemy-google-play-billing)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
