Read and decode torrent file/data OR build a torrent from source folder/file(s)
Supported signatures:
- Torrent(); // get an instance (usefull to scrape and check errors)
- Torrent( string $torrent ); // analyse a torrent file
- Torrent( string $torrent, string $announce );
- Torrent( string $torrent, array $meta );
- Torrent( string $file_or_folder ); // create a torrent file
- Torrent( string $file_or_folder, string $announce_url, [int $piece_length] );
- Torrent( string $file_or_folder, array $meta, [int $piece_length] );
- Torrent( array $files_list );
- Torrent( array $files_list, string $announce_url, [int $piece_length] );
- Torrent( array $files_list, array $meta, [int $piece_length] );
public __construct ( $data = null, $meta = [], $piece_length = 256 ) |