PHPackages                             jeankassio/php-deluge-console - 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. [CLI &amp; Console](/categories/cli)
4. /
5. jeankassio/php-deluge-console

ActiveLibrary[CLI &amp; Console](/categories/cli)

jeankassio/php-deluge-console
=============================

Connection to Deluge client/server console via PHP, with pre-established functions and open console to send commands.

0.2.1(3y ago)224MITPHPPHP &gt;=7.0

Since Aug 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/jeankassio/PHP-Deluge-Console)[ Packagist](https://packagist.org/packages/jeankassio/php-deluge-console)[ RSS](/packages/jeankassio-php-deluge-console/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)DependenciesVersions (11)Used By (0)

PHP-Deluge-Console
==================

[](#php-deluge-console)

Connection to Deluge-Torrent client/server console via PHP, with pre-established functions and open console to send commands.

[![Total Downloads](https://camo.githubusercontent.com/cae415995829158a255d1180b27f0b490d8376d951653c30ea419e6a9f295ba9/68747470733a2f2f706f7365722e707567782e6f72672f6a65616e6b617373696f2f7068702d64656c7567652d636f6e736f6c652f646f776e6c6f616473)](https://packagist.org/packages/jeankassio/php-deluge-console)[![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](https://opensource.org/licenses/MIT)

Php package from [deluge console](https://dev.deluge-torrent.org/wiki/UserGuide/ThinClient#Console)

Installation:

```
 composer require jeankassio/php-deluge-console
```

How to use:

```
require dirname(__FILE__) . '/vendor/autoload.php';

use JeanKassio\Deluge\Console;
use JeanKassio\Deluge\DelugeFunctions\BasicFunctions;

 /*
 Here you configure the connection settings.
 */

 $config = array(
	'console_command' => 'deluge-console', 	//optional, default is 'deluge-console'
	'host' => 'localhost',  		//optional, default is 'localhost'
	'port' => '58846',  			//optional, default is '58846'
	'user' => 'username',
	'pass' => 'password',
);

/*
Instancing a new Console
*/

$console = new Console($config);

/*
Here you call the method you want.
Let's in this example add a new torrent.
*/

/*
The first parameter is the Path where the file we are going to download will be saved.
The second parameter is the Magnet Link or the location where the .torrent file is stored.
*/

$id = 0; //Get id value from something
$id++;
$name = "file.torrent";
$c_torrent = dirname(__FILE__, 2) . "/content/torrent/$name";
$path = dirname(__FILE__, 2) . "/content/download/$id/";

if (!file_exists($path)) {
  mkdir($path, 0777, true); //Here I am creating a directory to save my file
  chmod($path, 0777);       //Here I am setting the permissions to 777, this is the permission level that Deluge needs so that the download can start normally.
}

/*
Here I am finally submitting the information and adding the torrent to Deluge
*/

$response = (new BasicFunctions($console))->addtorrent($path, $c_torrent);

```

Other existing methods
======================

[](#other-existing-methods)

Get torrent list

```
require dirname(__FILE__) . '/vendor/autoload.php';

use JeanKassio\Deluge\Console;
use JeanKassio\Deluge\DelugeFunctions\BasicFunctions;

$config = array(
	'console_command' => 'deluge-console', 	//optional, default is 'deluge-console'
	'host' => 'localhost',  		//optional, default is 'localhost'
	'port' => '58846',  			//optional, default is '58846'
	'user' => 'username',
	'pass' => 'password',
);

$console = new Console($config);

$torrents = (new BasicFunctions($console))->torrentList();

foreach($torrents as $torrent){

	var_dump($torrent);

}
```

Get a single Torrent

```
require dirname(__FILE__) . '/vendor/autoload.php';

use JeanKassio\Deluge\Console;
use JeanKassio\Deluge\DelugeFunctions\BasicFunctions;

$config = array(
	'console_command' => 'deluge-console', 	//optional, default is 'deluge-console'
	'host' => 'localhost',  		//optional, default is 'localhost'
	'port' => '58846',  			//optional, default is '58846'
	'user' => 'username',
	'pass' => 'password',
);

$console = new Console($config);

$torrent_id = "9c62d55c744642ef3f6f6daa3448055fb490a12e";

$torrent = (new BasicFunctions($console))->torrent($torrent_id);

var_dump($torrent);
```

Console, to make your own calls

```
require dirname(__FILE__) . '/vendor/autoload.php';

use JeanKassio\Deluge\Console;
use JeanKassio\Deluge\DelugeFunctions\BasicFunctions;

$config = array(
	'console_command' => 'deluge-console', 	//optional, default is 'deluge-console'
	'host' => 'localhost',  		//optional, default is 'localhost'
	'port' => '58846',  			//optional, default is '58846'
	'user' => 'username',
	'pass' => 'password',
);

$console = new Console($config);

$command = "status";

$response = (new BasicFunctions($console))->console($command);

var_dump($response);
```

New Methods
===========

[](#new-methods)

All these functions always return null

```
require dirname(__FILE__) . '/vendor/autoload.php';

use JeanKassio\Deluge\Console;
use JeanKassio\Deluge\DelugeFunctions\BasicFunctions;

$config = array(
	'console_command' => 'deluge-console', 	//optional, default is 'deluge-console'
	'host' => 'localhost',  		//optional, default is 'localhost'
	'port' => '58846',  			//optional, default is '58846'
	'user' => 'username',
	'pass' => 'password',
);

$console = new Console($config);

$bFunction = new BasicFunctions($console);

$bFunction->pause(true); //Pause all torrents

$bFunction->pause(false, array("9c62d55c744642ef3f6f6daa3448055fb490a12e","57a30a85b4a8375fc7a05a05c5f47e28b34da087")); //Pause only torrents listed with your ID

$bFunction->recheck(true); //Recheck on all torrents

$bFunction->recheck(false, array("9c62d55c744642ef3f6f6daa3448055fb490a12e","57a30a85b4a8375fc7a05a05c5f47e28b34da087")); //Recheck only on torrents listed with your ID

$bFunction->resume(true); //Resume all torrents

$bFunction->resume(false, array("9c62d55c744642ef3f6f6daa3448055fb490a12e","57a30a85b4a8375fc7a05a05c5f47e28b34da087")); //Resume only torrents listed with your ID

$bFunction->remove(array("9c62d55c744642ef3f6f6daa3448055fb490a12e","57a30a85b4a8375fc7a05a05c5f47e28b34da087")); //Delete the torrent without deleting the files

$bFunction->remove(array("9c62d55c744642ef3f6f6daa3448055fb490a12e","57a30a85b4a8375fc7a05a05c5f47e28b34da087"), true); //Delete the torrent and the files

```

Package modification of [deluge-php](https://github.com/NEOSoftWare/deluge-php)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

10

Last Release

1355d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b2796e8c233678ec7c8fb3317aa075d1da548ca7198ddd280ab9aefd944055f?d=identicon)[jeankassio](/maintainers/jeankassio)

---

Top Contributors

[![jeankassio](https://avatars.githubusercontent.com/u/26697873?v=4)](https://github.com/jeankassio "jeankassio (32 commits)")

---

Tags

consoledelugedeluge-apideluge-clientdeluge-consoledeluge-daemondeluge-torrent-clientdeluge-webtorrenttorrents

### Embed Badge

![Health badge](/badges/jeankassio-php-deluge-console/health.svg)

```
[![Health](https://phpackages.com/badges/jeankassio-php-deluge-console/health.svg)](https://phpackages.com/packages/jeankassio-php-deluge-console)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M319](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M18](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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