Download the PHP package coldwinds/torrent-rw without Composer
On this page you can find all versions of the php package coldwinds/torrent-rw. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download coldwinds/torrent-rw
More information about coldwinds/torrent-rw
Files in coldwinds/torrent-rw
Package torrent-rw
Short Description Composer version of torrent-rw https://github.com/adriengibrat/torrent-rw
License Version 3 of the GNU GPL
Informations about the package torrent-rw
Torrent
PHP version 5.2+
LICENSE: This source file is subject to version 3 of the GNU GPL that is available through the world-wide-web at the following URI: http://www.gnu.org/licenses/gpl.html. If you did not receive a copy of the GNU GPL License and are unable to obtain it through the web, please send a note to [email protected] so I can mail you a copy.
1) Features:
- Decode torrent file or data
- Build torrent from source folder/file(s)
- Silent Exception error system
2) Usage example
require_once 'Torrent.php';
// get torrent infos
$torrent = new Torrent( './test.torrent' );
echo '
private: ', $torrent->is_private() ? 'yes' : 'no',
'
annonce: ', $torrent->announce(),
'
name: ', $torrent->name(),
'
comment: ', $torrent->comment(),
'
piece_length: ', $torrent->piece_length(),
'
size: ', $torrent->size( 2 ),
'
hash info: ', $torrent->hash_info(),
'
stats: ';
var_dump( $torrent->scrape() );
echo '
content: ';
var_dump( $torrent->content() );
echo '
source: ',
$torrent;
// get magnet link $torrent->magnet(); // use $torrent->magnet( false ); to get non html encoded ampersand
// create torrent $torrent = new Torrent( array( 'test.mp3', 'test.jpg' ), 'http://torrent.tracker/annonce' ); $torrent->save('test.torrent'); // save to disk
// modify torrent $torrent->announce('http://alternate-torrent.tracker/annonce'); // add a tracker $torrent->announce(false); // reset announce trackers $torrent->announce(array('http://torrent.tracker/annonce', 'http://alternate-torrent.tracker/annonce')); // set tracker(s), it also works with a 'one tracker' array... $torrent->announce(array(array('http://torrent.tracker/annonce', 'http://alternate-torrent.tracker/annonce'), 'http://another-torrent.tracker/annonce')); // set tiered trackers $torrent->comment('hello world'); $torrent->name('test torrent'); $torrent->is_private(true); $torrent->httpseeds('http://file-hosting.domain/path/'); // Bittornado implementation $torrent->url_list(array('http://file-hosting.domain/path/','http://another-file-hosting.domain/path/')); // GetRight implementation
// print errors if ( $errors = $torrent->errors() ) var_dump( $errors );
// send to user $torrent->send();