But to get the InfoHash before the tracker work download this
Then copy BEncode.php and BDecode.php to your server's root directory or new folder.
Then use this code to view the infohash:
Code: Select all
<?php
include('./BDecode.php');
include('./BEncode.php');
$tfile = BDecode(file_get_contents("/path/to/torrent/file.torrent"));
$infohash = sha1(BEncode($tfile["info"]));
echo $infohash;
?>