I’m using PeerTracker http://en.wikipedia.org/wiki/PeerTracker to track torrent hashes. I have a simple HTML page to display information about the tracker like its announce url. The tracker comes with announce.php and scrape.php where announce is used to tell the tracker you have a hash to be tracked and scrape is used to return stats and information on the tracker or specific hashes. I would like to be able to use scrape.php to return the total number of hashes being tracked and the total number of peers for the entire tracker. I’m pretty much stuck because I don’t know the Bittorrent standard to retrieve that information and if its even implemented the same way on PeerTracker and I’m also not sure how I would call and display this information on an HTML page using scrape.php.
edit:
So my question would be how would I take the information returned by scrape.php and display it on a HTML page
“The response of this HTTP GET method is a “text/plain” or sometimes gzip compressed document consisting of a bencoded dictionary”
When I run
GET -uUsSed http://Tracker.SpaceAgeMinds.com:80/scrape.php
on my linux machine I get the following.
GET http://Tracker.SpaceAgeMinds.com:80/scrape.php
User-Agent: lwp-request/5.834 libwww-perl/5.836
GET http://Tracker.SpaceAgeMinds.com:80/scrape.php --> 200 OK
Connection: close
Date: Thu, 24 Nov 2011 05:46:32 GMT
Server: Apache mod_qos/9.69 mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Content-Length: 0
Content-Type: text/html
Client-Date: Thu, 24 Nov 2011 05:46:33 GMT
Client-Peer: 184.172.188.79:80
Client-Response-Num: 1
X-Powered-By: PHP/5.2.17
If it helps:
http://www.ohloh.net/p/peertracker
http://code.google.com/p/peertracker/
http://en.wikipedia.org/wiki/BitTorrent_%28protocol%29
http://Tracker.SpaceAgeMinds.com/scrape.php
or just
http://Tracker.SpaceAgeMinds.com/scrape
the scrape.php will output a simple text, when called with the stats argument. For example the url
will output something like this:
If you have another php script, you can invoke the scrape file with this command:
EDIT: I also wanted to say that you can display the output in xml or json format as well. Please reference the call below: