Transmission RPC PHP Library


This project has merged with Johan Adriaans'. Please visit
(This page left up for archival and historical purposes.)


I wrote this library as an easy means to interface a PHP script I was working on with Transmission Bittorrent client using Transmission's RPC method. The library is still relatively skeleton right now, but it should support all of Transmission's RPC methods as of Transmission 2.01 (RPC version 9). 
Disclaimer: It has not been thoroughly tested. Is that clear? Not fully tested. It works for my project, and when I'm done with the project I'll focus on the library. For now though, it's a solid stepping-stone.


Usage is very simple. The following will return the same data the "transmission-remote -l" retrieves from the RPC.
$transmissionRPC = new TransmissionRPC('http://HOSTNAME:9091/transmission/rpc');
		array(),	// id's
		array(		// Fields

Known Caveats/Issues/Shortcomings:

Doesn't parse the "result" field - that's up to you.
Doesn't do any protocol version checking.
Debugging could be much cleaner.
Could do some input-checking and validation.
Could add some convenience methods, such as list_torrents.
Does NOT support authentication yet. (Ensure that your Transmission server is secured, IP-based masking, firewall, etc)
Should verify all text is UTF-8 encoded.
Error reporting could use improvement.


Version 0.1 - Initial release. Still very rough.


Based off JSON-RPC ( client class.
The fine developers of Transmission Bittorrent client - my personal favourite, obviously. (


This code is licensed under the GPLv2.
Bryce Chidester,
Jun 28, 2010, 12:38 AM