2017 © Pedro Peláez
 

library torrent

Torrent file decoder / encoder

image

devristo/torrent

Torrent file decoder / encoder

  • Sunday, September 25, 2016
  • by Devristo
  • Repository
  • 6 Watchers
  • 30 Stars
  • 1,800 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Features

Extract data from .torrent files and change them, (*1)

Getting started

Install using composer. Add the following to your composer.json, (*2)

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/Devristo/torrent"
        }
    ],
    "require": {
        "devristo/torrent": "dev-master"
    }
}

Reading Torrent Files

use Devristo\Torrent\Torrent;

$torrent = Torrent::fromFile('ubuntu-13.10-desktop-amd64.iso.torrent');
echo $torrent->getInfoHash(false) // echoes e3811b9539cacff680e418124272177c47477157

Modifying Torrent Files

$torrent->setPrivate(true);
$torrent->setComment("Downloaded from example.org");

file_put_contents("private-tracker.torrent", $torrent->serialize());

The Versions

25/09 2016

dev-master

9999999-dev

Torrent file decoder / encoder

  Sources   Download

BSD

The Development Requires

by Chris