Page 1 of 1

Torrent UDP Trackers and PHP

Posted: Sat Dec 27, 2008 11:42 am
by cptnwinky
I'm writing up a php5 class that will do various operations on a torrent file. One of the features of this is that if there are more than one trackers it will loop through all of them and create an aggregate of all seeders, leechers and total downloads. For the most part this works well.

The problem is with UDP trackers. I want to be able to implement the scraping of UDP trackers but I'm not sure if it will work with PHP5. The reason; as far as I understand it the connection ID sent to the UDP tracker needs to be a 64 bit integer. From what I understand PHP5 is only able to make 32 bit integers. I read somewhere that PHP6 will support 64 bit integers but installing it on my server and trying to typecast using (int64) didn't work. That was really just a guess on my behalf of how it should work.

So, does anyone have any idea how I could accomplish this (either with PHP5 of 6)? Am I just misunderstanding the problem?

Reference: http://xbtt.sourceforge.net/udp_tracker_protocol.html