PHP Classes

announce_list() parameters

Recommend this page to a friend!

      Torrent RW  >  All threads  >  announce_list() parameters  >  (Un) Subscribe thread alerts  
Subject:announce_list() parameters
Summary:Clarification on the parameters requred to use announce_list()
Messages:3
Author:N. T. Hanks
Date:2009-07-31 14:22:17
Update:2010-05-08 17:57:37
 

  1. announce_list() parameters   Reply   Report abuse  
Picture of N. T. Hanks 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!

  2. Re: announce_list() parameters   Reply   Report abuse  
Picture of N. T. Hanks N. T. Hanks - 2009-08-01 01:17:33 - In reply to message 1 from N. T. Hanks
UPDATE: This applies to 0.1 only.

Adrian updated today with v0.5, which works slightly differently, and he's added tiered tracker instructions to the documentation, so disregard this!

  3. Re: announce_list() parameters   Reply   Report abuse  
Picture of Edward Meacham Edward Meacham - 2010-05-08 17:57:37 - In reply to message 2 from N. T. Hanks
Thanks for the info mate. Glad to see people giving back!