transmission
transmission copied to clipboard
Change the Tracker URL
Hello,
I'm trying to change de URL of trackers. But doesn't work. Anyone knows how can I do it?
Can you show your code?
Follow the code.
$transmission = new Vohof\Transmission($config);
$trackers = ($transmission->get(1, array('trackers')));
$trackers = $trackers['torrents'][0];
//print_r($trackers);
foreach ($trackers['trackers']as $tracker){
//print_r($tracker);
$tracker['announce'] = str_replace("......", "......", $tracker['announce']);
$tracker['scrape'] = str_replace("....", "....", $tracker['scrape']);
$newtracker['trackers'][0] = $tracker;
//print_r($newtracker);
}
print_r($transmission->get(1,array('name')));
$transmission->set(1, $newtracker);