Homepage » My Releases, Torrent Live Stats » Torrent Live Stats v0.2

Torrent Live Stats v0.2

By Jonathan + June 30th, 2005

About:
Torrent Live Stats is a hosted script to which you can upload a BitTorrent file or point to an existing bittorrent, and from which an image is generated with the contents and size of the torrent and live statistics on the number of seeds and leeches. It is meant to be used to post a torrent’s statistics on a Web page or in a forum. 

Download it here

Screenshot:

Freshmeat Project 

 

 

24 Comments at "Torrent Live Stats v0.2"

steve July 18th, 2005 (#)

Hi,

This is great, thanks very much.

Is is possible to also display the total number of completed downloads in the image? ie the number of times the files within the torrent download.

Steve

Jonathan July 19th, 2005 (#)

Hey, you’re welcome Steve :-)

Since the stats are grabbed by hitting the tracker, as long as trackers don’t return that data, neither can I unfortunatly. However, I know at least one group was building images like this into their tracker so you could upload your torrent, then put a hosted image onto your site/forum post. I think it was the old tracker that ran Torrentz. Let me know if you find anything ;-)

steve August 15th, 2005 (#)

another question for you :) trying to add a image that i get from a torrent to a forum within image tags. I get a different type of url then is shown on your demo site. if i post the same torrent on your demo iste i get this url, which doesn’t result in an impage (times out) …/torrent6ec8eea2ffbe0045f353fbd7fb6e01a6b05a1cb5.upload.torrent.FFFFFF.000000.PNG On my site i get ; …/torrent.php?torrent=bb04d24ac79b691ea90ec5c39ba55be1e53960a8.upload.torrent&textcolor=FFFFFF&bgcolor=000000 This image doesn’t dynamically update within a forum, but is fine within a normal html page… Any ideas? ie why do we get different output urls?

Jonathan August 15th, 2005 (#)

To setup forum-friendly URLs like that, just place a .htaccess file in the directory with the script with the following contents:

RewriteEngine On
RewriteRule ^torrent(.+)\.([a-zA-Z0-9]+)\.([a-zA-Z0-9]+)\.png$ /torrent.php?torrent=$1&textcolor=$2&bgcolor=$3&format=PNG

grog August 21st, 2005 (#)

hey im not sure what sort of stats are returned by the tracker but if it could show the ’swarm speed’ that would be awesome. I know that azureus shows this but i have a funny feeling it does this by connecting to all the peers and querying the, any way if that was possible it would be very cool

Jonathan August 21st, 2005 (#)

That’s a great idea grog. This post seems to imply that swarm speed is calculated by the tracker itself but I can’t find any documentation. I’ll check out the bencoded replies from common trackers and see if I can find anything. If I do, I’ll release a v0.3…finally :D

d3vlabs March 5th, 2006 (#)

Warning: unlink(/tmp/): Is a directory in /home/rusername/public_html/btstats/torrent_inc.php on line 146

tried setting to /tmp/ in root to 777
and tried changing /tmp in configs to another dir

still nada.

any ideas?

Jonathan March 5th, 2006 (#)

Are you sure you’re passing in a torrent url for it to fetch? It sounds like it’s getting to that line with $torrentfile being null so line 146 is trying to delete /tmp (which is not good ;-)). What’s the full URL of your call to the script?

Thanks for checking it out!

d3vlabs March 5th, 2006 (#)

well i tried

// linking to a remote torrent hosted thepiratebay
// //using the linux torrent in example
trying this url:
http://torrent.unix-ag.uni-kl.de/torrents/KNOPPIX_V4.0.2DVD-2005-09-23-DE.torrent
// downloading a torrent and the uploading it

everytime this is what I get:

still

Warning: unlink(/tmp/): Is a directory in /home/username/public_html/media/btstats/torrent_inc.php on line 146

:: tmp in root is chmod to 777
:: scrapes is created inside btstats folder and chmoded to 777
:: maketorrent/torrent.php have the changes described in README applied to them as well as tried both chmod 755 and 777. its 755 right now

You can see the demo here: http://www.rapgodfathers.com/media/btstats/

Thanks for your time. Just asking for advice. For right now I will try on a diff server.

Jonathan March 5th, 2006 (#)

I tried with http://www.rapgodfathers.com/media/btstats/torrent.php?torrent=http://torrent.unix-ag.uni-kl.de/torrents/KNOPPIX_V4.0.2DVD-2005-09-23-DE.torrent and it looks like it is working…except you don’t have the GD PHP library installed (”Call to undefined function: imagecreatetruecolor()”). You’ll need to get that library installed on your server and it should probably work for you. Good luck!

d3vlabs March 5th, 2006 (#)

got it working on another server with GD. Thank you for this.

Last question:
Should the information about a torrent be saved in in the sql db so that you can always call upon the same torrent info again by using torrent.php ? Or i have to use a format of
http://www.rapgodfathers.com/media/btstats/torrent.php?torrent=http://torrent.unix-ag.uni-kl.de/torrents/KNOPPIX_V4.0.2DVD-2005-09-23-DE.torrent
everytine to post the torrent info?

Thanks once again

[...] Similar to my Torrent Live Stats script that people have been using to show Bittorrent statistics for an individual file via a dynamically generated image, I whipped up this script to pull the most recent reasons for a WYS thread into a JPG. [...]

mark June 26th, 2007 (#)

is there any chance of someone sending me the file or re uploading it as the download link dont work no more thanks

ChennaiStyle July 1st, 2007 (#)

Hello,

I tried to download this Code, but I cant, link is missing.
Can u please update, It will be useful to display the torrent stats in my site ..

mark July 22nd, 2007 (#)

please please can someone email me this mini_mark443@hotmail.com

Ta Duy Duc August 15th, 2007 (#)

Pls reupload the files… I can’t download it…

Jonathan August 16th, 2007 (#)

Oops, I had the files on a domain that a squatter stole. You can download it here now. My bad ;)

kiim January 30th, 2008 (#)

Hey Jonathan,

Ive tried out your script, but whatever torrentfile I try, be local or remote I get the status *DOWN*. Any idea?

K

Jonathan January 30th, 2008 (#)

@kiim: Sorry you’re having problems with the script. Maybe it’s having problems downloding the torrent files and saving them locally? Make sure your permissions are correct (they should all be in the README). Lemme know if you’re still having problems and I’ll try to remember how this thing works :)

kiim January 31st, 2008 (#)

Thanks for swift response :)

Ive set up everything as described in the README, but get the *DOWN* message even with uploaded files aswell as regular links. You can see the test here: http://www.superlasten.com/dev/bt/maketorrent.php

K

AdamSnake March 17th, 2008 (#)

Hi all!

I’ve tested the script on my own PC used as a web server. Every requirements are OK, but when I try to generate the picture, it shows me an error message: Warning: unlink(/tmp/722c25c71b5a59bfa93091db2fec7ba1761682d0.torrent) [function.unlink]: No such file or directory in C:\WLMP\HTDOCS\torrent-live\torrent_inc.php on line 154

why it’s happening? plz, help :(

sig files May 26th, 2008 (#)

[...] torrent file and have it’s live stats show in a nice little image that you can add as a forum sig.http://www.keebler.net/blog/2005/06/30/torrent-live-stats-v02/Signature FileIf you want, Spruce can automatically attach a standard signature file to the end of [...]

Ahmed June 9th, 2008 (#)

hi..
Hey can u help me understand how to get live stats.. i need to know the indepth logic behind it. i will realy appreciate your help.

Regards

Qu3 October 14th, 2008 (#)

Jonathan, thanks a lot for the script.
I’ve configured it on a test environment but I get the *DOWN* message with both uploaded and linked files.

Could you help with this?

Screenshot here: http://img519.imageshack.us/img519/6587/torrentstatswa4.jpg

Comment Now!

Name* Email* Blog / Website

Latest Posts

C#: Returning an array via webservice with derived classes November 20th, 2008

C#: Returning an array via webservice with derived classes

Here’s a neat little thing I learned today. I was writing a WebMethod for a WebService I’m working on for ScribbleLive. The return type[...] Read the rest »