My directory structure:
bencode_test-
|--> BEncode.php
|--> bencode_test.php
|--> ubuntu-15.10-desktop-amd64.iso.torrent
my code:
<?php
require 'BEncode.php';
$bcoder = new BEncode();
$torrent = $bcoder->bdecode( File::get('ubuntu-15.10-desktop-amd64.iso.torrent'));
var_dump($torrent);
?>
I got BEncode.php from this Github account.
When I run my code, bencode_test.php from the command line, the error I get is:
PHP Fatal error: Class 'BEncode' not found in /home/user/bencode_test/bencode_test.php on line 3
Can someone tell me what I'm doing wrong?