deluge-php - Simple php wrapper for the deluge-web json api
The deluge documentation is a little scattered. This should help people get up and running with the json api. Includes the core methods, webui methods, and also the webapi plugin (see url below) Most functions are not tested, as they are automatically parsed from the following places:
include("deluge.class.php"); $deluge = new deluge("https://127.0.0.1:8112", "yourpassword"); $torrents = $deluge->getTorrents(null, null); $status = $deluge->getTorrentStatus($torrents->hash, array(), array()); $deluge->close() //Closes the cURL handle
Functions take a variety of arguments. Unused arguments are usually either null (equivalent to Python None) or array(). Experimentation may be necessary.
For debugging purposes, the header and body of the last request and response are stored in the public class property
last_http_transaction (stdObj with obviously named properties)
Check the deluge-web log for details of failed requests. Failures throw php Exception's.
GPL v3.0: See LICENSE.md