1. Go to this page and download the library: Download bhutanio/laravel-bencode library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
/**
* Data Setter
* @param array $data [array of public variables]
* eg:
* $bcoder = new \Bhutanio\BEncode;
* $bcoder->set([
* 'announce'=>'http://www.example.com',
* 'comment'=>'Downloaded from example.com',
* 'created_by'=>'TorrentSite v1.0'
* ]);
*/
public function set($data=array()) {}
/**
* Decode a torrent file into Bencoded data
* @param string $s [link to torrent file]
* @param integer $pos [file position pointer]
* @return array/null [Array of Bencoded data]
* eg:
* $bcoder = new \Bhutanio\BEncode;
* $torrent = $bcoder->bdecode( File::get('MyAwesomeTorrent.torrent'));
* var_dump($torrent);
*/
public function bdecode($s, &$pos=0) {}
/**
* Created Torrent file from Bencoded data
* @param array $d [array data of a decoded torrent file]
* @return string [data can be downloaded as torrent]
*/
public function bencode(&$d) {}
/**
* Decode a torrent file into Bencoded data
* @param string $filename [File Path]
* @return array/null [Array of Bencoded data]
*/
public function bdecode_file($filename) {}
/**
* Generate list of files in a torrent
* @param array $data [array data of a decoded torrent file]
* @return array [list of files in an array]
*/
public function filelist($data) {}
/**
* Replace array data on Decoded torrent data so that it can be bencoded into a private torrent file.
* Provide the custom data using $this->set();
* @param array $data [array data of a decoded torrent file]
* @return array [array data for torrent file]
*/
public function make_private($data) {}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.