News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rudi's Blog:
Get torrent data with PHP
November 06, 2008 @ 13:50:39

This new post to Rudi's blog shows how, with the help of an external class you can use PHP to grab information from a torrent file.

To use this code you first need to include a file with the benc, bdec and hex2bin functions. To get the torrent data (like the announce url, the files etc) it is enough if we decode the content of the torrent. On the other hand, if we want to read the number of seeds, leechs and downloads, we must encode the info part of the torrent, encrypt it with the sha1 function and convert the result to lowercase.

He includes the code to make the decoding/encryption of the results a copy and paste away (once you have these functions to work from). He's even provided an example using the code that gets the information from a torrent on the Pirate Bay website.

1 comment voice your opinion now!
torrent data library class tutorial bdec hex2bin


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: PEAR HTML_Table: Displaying Tabular Data in PHP

O'Reilly Broadcast: Getting Drupal and mod_security to Play Nicely Together on Red Hat 5.x Servers

DevShed: Building a Content Management System with Code Igniter

DevShed: Building File Uploaders with PHP 5

Mike Willbanks's Blog: Building and Maintaining a PEAR Server with Pirum


Community Events





Don't see your event here?
Let us know!


opinion package interview zendserver series tips api symfony release introduction framework deployment language podcast laravel library update community bugfix install

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework