url_list() public method

Getter and setter of webseed(s) url list ( GetRight implementation )
public url_list ( $urls = null ) : string | array | null
return string | array | null webseed(s) or null if not set
Esempio n. 1
0
echo '<br>source: ', $torrent;
// 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('<br>DEBUG: ', $errors);
    // errors method return the error stack
}
// send to user
$torrent->send();
///////////////////////////////////////////////////////////////////////////////
//parse Torrent
require 'TorrentReader.php';
$debug = 0;
if (!empty($_FILES['torrent'])) {
    if (!empty($_FILES['torrent']) && empty($_FILES['torrent']['error']) && file_exists($_FILES['torrent']['tmp_name'])) {
        $szTorrentFile = $_FILES['torrent']['tmp_name'];