adriengibrat / torrent-rw

php5 class to read and write .torrent files
GNU General Public License v3.0
325 stars 103 forks source link

UDP Tracker Scrape #3

Open eremini opened 13 years ago

eremini commented 13 years ago

Hi,

This is more of a feature request. Could you please consider making it possible to scrape a UDP tracker for numbers, as a lot of trackers seem to be switching to UDP only model (openbittorrent being the biggest one). Since you now use CURL this should be no problem.

Cheers.

adriengibrat commented 13 years ago

Hello, Interesting point! Any idea where i could find the spec? I have no idea how to do that...

Adrien

2011/6/2 eremini < reply@reply.github.com>

Hi,

This is more of a feature request. Could you please consider making it possible to scrape a UDP tracker for numbers, as a lot of trackers seem to be switching to UDP only model (openbittorrent being the biggest one). Since you now use CURL this should be no problem.

Cheers.

Reply to this email directly or view it on GitHub: https://github.com/adriengibrat/torrent-rw/issues/3

eremini commented 13 years ago

Hi,

Good to hear that you're interested. The oficial spec is located here: http://xbtt.sourceforge.net/udp_tracker_protocol.html

Let me know if you need any other info, help or testing.

Cheers.

adriengibrat commented 13 years ago

Thanks for the link, now i have to find some time to try implementing this

adriengibrat commented 13 years ago

Ok, i've just look deeper into some doc (the link you posted + http://www.rasterbar.com/products/libtorrent/udp_tracker_protocol.html) It seems I have to implement Connection, Scraping, Error & eventualy Authentification... using sockets. And Curl isn't any help here!

eremini commented 13 years ago

Yeah you're right I forgot you got to use sockets in this case, so I guess it gets more complicated :/

Example of UDP communication from php.net <?php $frame = array( array(1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1), array(1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1), array(1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1), array(1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1), array(1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1), array(1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1), array(1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1), array(1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1) );

send_frame($frame, 1500);

/**

adriengibrat commented 13 years ago

very interesting code: https://github.com/johannes85/PHP-Torrent-Scraper

eremini commented 13 years ago

Ah nice, it's not as complicated as I thought, perhaps you can reuse some of his code in your way

johannes85 commented 13 years ago

The easyest way to do it would be to implement some kind of a plugin system so a external scraper class (like mine) could be used. Some Dependency Injection stuff or so. But then there is the question if you want to extend your compact class to a bigger system? A torrent framework which can handle all torrent related tasks would be very useful.

adriengibrat commented 13 years ago

Sorry I still haven't done anything about that! If anyone want to submit a patch or a push, it's always welcome.

I'm not using torrent very often, I just did that class for fun... So no torrent Framework in sight.

eremini commented 12 years ago

I am willing to make a donation even if someone is willing to implement UDP scraping into this code!

adriengibrat commented 12 years ago

As soon as i got some time i'm willing to implement UDP scraping + DHT methods using UDP transfert protocol. I'm open for any help as I got only few spare time (got a new job 2 weeks ago and a beautifull son 3 days ago!). Anyone wanting to help on this, please clone and start coding ;)

eremini commented 12 years ago

I guess no progress on this yet adriengibrat . I'd honestly be willing to donate to someone if they got this done by now, I simple don't have the time or the skill anymore.

EdOzolins commented 11 years ago

Hey adriangibrat! Here is what I found for udp scraping. https://github.com/ZonD80/Kinokpk.com-releaser/blob/3.30/Kinokpk.com_releaser_v.3.30/upload/include/benc.php

It would be great if you could add udp to your class. Thanks

robinlahtinen commented 8 years ago

Updates?

adriengibrat commented 8 years ago

PR always welcome. I dont have time/motivation to do it, but i will happily review & merge.

darkalchemy commented 4 years ago

I added this using the scrapeer class, its in the changes/demo branch. 8cb60d8

teamcoltra commented 1 year ago

I notice that at least some if not all of @darkalchemy 's commit has not made it to the master branch. Did this feature get implemented differently or is there something holding this up?