<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 19 May 2013 19:50:37 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Rudi's Blog: Get torrent data with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11360</guid>
      <link>http://www.phpdeveloper.org/news/11360</link>
      <description><![CDATA[<p>
<a href="http://blog.zurka.us/index.php/2008/10/13/get-torrent-data-with-php/">This new post</a> to <i>Rudi</i>'s blog shows how, with the help of <A href="http://blog.zurka.us/go.php?http://blog.zurka.us/wp-content/uploads/2008/10/functions.phps">an external class</a> you can use PHP to grab information from a torrent file.
</p>
<blockquote>
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.
</blockquote>
<p>
He includes the code to make the decoding/encryption of the results a copy and paste away (once you have <a href="http://blog.zurka.us/go.php?http://blog.zurka.us/wp-content/uploads/2008/10/functions.phps">these functions</a> to work from). He's even provided <a href="http://blog.zurka.us/go.php?http://blog.zurka.us/wp-content/uploads/2008/10/torrent.phps">an example using the code</a> that gets the information from a torrent on the Pirate Bay website.
</p>]]></description>
      <pubDate>Thu, 06 Nov 2008 13:50:39 -0600</pubDate>
    </item>
  </channel>
</rss>
