I'm trying to find among the documentations an example I can reproduce but there is no real example showing what deluge is waiting as variable for set a configuration variable in PHP.
I would like to throttle the Deluge bandwidth from my home automation system which would take HTTP post type of action.
It can be pretty slick such as Turning on gaming PC -> cap the speed, leaving home -> unleash the speed.
I'm using the Wrappers on Github:
https://github.com/kaysond/deluge-php
I can list the hash of the torrent and I'm connected to the deluge APi.
The wrappers has this function established:
Code: Select all
public function setConfig($config) {
return $this->makeRequest("core.set_config", array($config));
}
And there i'm struggling to pass the parameters I want since I'm not a dev and I can't find example to inspire myself from.
To keep it simple, I'm starting with max_connection_global parameter and I'm stuck with this:
Code: Select all
$max_connections_global="max_connections_global:2000";
$speedlimit = $deluge->setConfig($max_connections_global);
$deluge->close() //Closes the cURL handle
Code: Select all
$deluge = new deluge("http://IP:8112", "pass");