title: Pure PHP torrent client?
body: <p>I'm a developer for a PHP CMS and I want to add a BitTorrent capability to it. The CMS already lets users upload files which other users can then download, comment, etc. but I think this could be improved (especially for low-bandwidth sites) if the CMS could offer these downloads via BitTorrent, either via .torrent metadata files or via magnet links, so that the upload burden is shared.</p>
  
  <p>It seems pretty straightforward, since there are loads of existing trackers out there I could plug in to, and the process of creating the required metadata is well documented, but the final piece of the puzzle is getting the site to act as a seed for the files, in case nobody else is seeding (eg. when it's newly added). I've spent a while searching, but can't find any PHP code which will seed files via BitTorrent, either via a tracker or via the DHT. There are plenty of frontends for torrent applications like rtorrent, Vuze, etc. but I'm looking for pure PHP, as I don't want to introduce dependencies which can't be satisfied by users on crappy, locked-down shared hosting accounts. Does anyone know of any PHP code capable of this floating around, or will I have to roll my own?</p>