Location: PHPKode > scripts > BEncoder > example.php
<pre>
<?php
// Read and dump torrent file
require_once 'BEncoder.inc.php';

$filename = 'test.torrent';
if (!is_readable ($filename)) die ('Cannot read ' . $filename);

$encoder = new BEncoder ();
$encoder->decode (file_get_contents ($filename));

// Dump out decoded torrent
var_dump ($encoder->source);
?>
</pre>
Return current item: BEncoder