N. T. Hanks - 2009-07-31 14:22:17
I was having trouble with announce_list(), so I emailed Adrien, who cleared it up for me.
I just thought I'd share the solution here in case anyone else encounters the same problem.
announce_list() requires the parameter to be an array of arrays
Like so:
array(array('http://tracker.domain.com/announce','http://other-tracker.domain.com/announce'),array('http://tracker.other-domain.com/announce'));
You will notice that the structure of that array is
$array[0][0] = 'http://tracker.domain.com/announce';
$array[0][1] = 'http://other-tracker.domain.com/announce';
$array[1][0] = 'http://tracker.other-domain.com/announce';
This puts the first two trackers on the same tier - with multiple trackers on the same tier, a tracker is "randomly" chosen from that tier by the torrent client.
When they are on different tiers, all are scraped.
It is useful to put different trackers on the same domain in the same tier so you don't send redundant requests.
See the bittorrent spec (or even just the wiki entry) for more info.
I hope this helps someone! Many thanks to Adrien for the class, and for the help!