Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
User Posts

Go to Profile

BT v1/v2 parser Work — 2022-02-14 05:46:49 in M-BiTsy Support
seem to get errors on subfolders have you tried a few v2 torrents, i managed to get something to go through the new file tree and can get paths & length ($torrentinfo['files']) array working better - but still not getting the subfolder as it should

progress so far - this is where i check extension - if no dot exist i assume its a folder - i just skip at minute but that should be placed somewhere
i just need same array for both so close i can use $path = $file['path'][1] ?? $file['path'][0]; to alter v1 to match but again that removes the subfolder i hate multiarrays 😈

https://torrenttrader.uk/atest look at the subfolder/subtitles

    public function torr($filename = "")
   {
       // First Check File Is Torrent
       $torrent = explode(".", $filename);
       $fileend = strtolower(end($torrent));
       if ($fileend != "torrent") {
           die('this is not a torrent');
       }

       // Set Arrays
       $torrentInfo = array();
       $array = array();

       // Read The File
       $parse = file_get_contents("$filename");
       if (!isset($parse)) {
           die("Error Getting Torrent file");
       }

       // Decode File Array
       $array = Bencode::decode($parse);

       // If Array Lets Read It
       if ($array === false) {
           die("Unable to decode file.");
       }

       // Check Info Is There
       if (array_key_exists("info", $array) === false) {
           die("Error opening torrent.<br>");
       }

       // Read info
       $info = $array["info"];
       if (isset($info["file tree"]) && isset($info["files"])) {
           die('We do not allow hybrid, we except v1 while others catch up but use v2 when possible');
       }

       // Get Announce URL
       $torrentInfo['announce'] = $array["announce"];

       // Get Announce List Array
       if (isset($array["announce-list"])) {
           $torrentInfo["announce-list"] = $array["announce-list"];
       }

       // Calculates date from UNIX Epoch
       $torrentInfo["creation date"] = date('r', $array["creation date"]);

       // Get torrents comment
       if (isset($array['comment'])) {
           $torrentInfo['comment'] = $array['comment'];
       }

       // The name of the torrents is different to the file name
       $torrentInfo['name'] = $info['name'];

       // Calculate Size/Count
       $filecount = 0;
       $torrentsize = 0;

       // Get The Hash
       if (isset($info["file tree"])) {
           // Calculates SHA256 Hash
           $hash = hash('sha256', Bencode::encode($info));
           $torrentInfo['hash'] = substr($hash, 0, 40);
           // Return Marker To identify as v2
           $torrentInfo['type'] = '2';
       } else {
           // Calculates SHA1 Hash
           $torrentInfo['hash'] = hash('sha1', Bencode::encode($info));
           // Return Marker To identify as v1
           $torrentInfo['type'] = '1';
       }

       // V2 Get file list
       if (isset($info["file tree"]) && is_array($info["file tree"])) {
           // For Now Dont Allow V2
           //unlink("$filename");
           //die("We Dont Except V2 Torrents Just Yet.");

           $Iterator = new RecursiveIteratorIterator(
               new RecursiveArrayIterator($info["file tree"]),
               RecursiveIteratorIterator::SELF_FIRST
           );
           foreach ($Iterator as $key => $val) {
               if ($key != 'pieces root' && $key != 'length' && !empty($key)) {
                   $subfolder = substr($key, -4, 1);
                   if($subfolder === '.') {
                       $keys = $key;
                   }
                   $filecount = ++$filecount;
               }
               if ($val > 1 && is_int($val)) {
                   $vals = $val;
                   $torrentsize += $val;
               }
               if ($val > 1 && is_int($val)) {
                   $paths[] = [
                       'length' => $vals,
                       'path' => $keys,
                   ];
               }
           }

           $torrentInfo['files'] = $paths;
           $torrentInfo['length'] = $torrentsize;
           $torrentInfo['ttfilecount'] = $filecount;

       } elseif (isset($info["files"]) && is_array($info["files"])) {

           // V1 Get file list
           foreach ($info["files"] as $file) {
               $filecount = ++$filecount;
               $torrentsize += $file['length'];
               $path = $file['path'];
               //$path = $file['path'][1] ?? $file['path'][0]; // subfolder?
               $length = $file['length'];
               $paths[] = [
                   'length' => $length,
                   'path' => $path
               ];
           }

           $torrentInfo['files'] = $paths;
           $torrentInfo['length'] = $torrentsize;
           $torrentInfo['ttfilecount'] = $filecount;
       } else {
           // Single File Torrent
           $torrentInfo['name'] = $info['name'];
           $torrentInfo['length'] = $info['length'];
           $torrentInfo['ttfilecount'] = 1;
       }

       return $torrentInfo;
       //var_dump($torrentInfo);
   }
 
ballon user TTV3 — 2022-02-14 04:15:42 in v3 Mods Requests
do you use class colour mod to change colour of group names if so post the function think i can do this  👍
BT v1/v2 parser Work — 2022-02-12 12:56:20 in M-BiTsy Support
great work, still seem to have issue with file tree, if you look at the subs folder in each array you see the v2 isnt been picked up,  https://torrenttrader.uk/atest
hybrid seems to be wrong size, my understanding is we only need the torrent file detail bits for db so for hybrid we dont need to run through both file tree & path.

BT v1/v2 parser Work — 2022-02-06 10:20:55 in M-BiTsy Support
this is what ive got returning so far https://torrenttrader.uk/atest with this,
although for hybrid it should do both and return array(v1hash, v2hash) and array merge both files structures thats where pain comes, ill post any progress mate  👍
xxx filter — 2022-02-06 05:27:45 in v3 Mods in Progress
had a quick look at the mod try add the sql and just the admincp edits, then still on admincp add at top just below <?php place
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);


lets see whats happening  👍 this code is for testing so remove after
Scrape — 2022-02-06 05:16:31 in v3 Support
go to yoursiteurl/check.php allow_url_fopen is turned on
check port 80 is allowed (udp port) - ask host

if its working on https it must be a server setting, my udp wont work on this site because host keeps switching settings of. If these two are on then it will be a server firewall, Botanicar had same issue but it is server side not code
xxx filter — 2022-02-06 05:05:30 in v3 Mods in Progress
try https://torrenttrader.uk/topic?topicid=9837 & im sure there was a block somewhere as well
When I move forum around I'll add a document section
Pending MOD — 2022-01-29 04:43:28 in M-BiTsy Support
Some good ideas, ill look into these - some bits are started request, bonus etc i think there is old torrent moderation mod on the site ill have a look
I will make this post sticky 👍

Quote:
Clone tmdb/tvdb internal to TT PDO


i love tmdb that is what i am hoping to do the demo page with - on site there is no link but here is page i was playing i just need to add posters to index and then have option of table of torrents or like above just posters
https://torrenttrader.uk/moviedatabase/submit
the plan is to do test with torrents today - then use them to do demo page - then post to github
phpbb3 forum with tracker — 2022-01-24 19:17:11 in v3 Support
It's difficult to merge both properly for phpbb I used to use this http://www.ppkbb3cker.ru/

You can add as extension
Tree file — 2022-01-23 08:46:26 in General Chat
What code did you end up with
Bug Tracker — 2022-01-20 12:45:56 in M-BiTsy Support
Quote:
admincp -> forum management (bug ??)


you most make cat before one can be selected
Bug Tracker — 2022-01-20 12:19:03 in M-BiTsy Support
Quote:
Admincp ->  Settings (bug)


have you added username in app/config/config.php - this is for security only admin class can use
define('_OWNERS', array('M-jay'));
Bug Tracker — 2022-01-20 12:03:02 in M-BiTsy Support
ill look at these, attachments should be working better now
Bug Tracker — 2022-01-19 16:37:31 in M-BiTsy Support
here is copy i just added here to test on v2 - for updating you just need to do the following 2 things

after downloading https://mega.nz/file/ZUplHYSb#GTfGEEuKkxn7eNq1u-kArMi_E5v4q11yLOPYUAyObBc
1) delete app/config folder so you dont have to do settings again
2) delete htaccess from the public_html folder
transfer new files
Bug Tracker — 2022-01-18 17:10:06 in M-BiTsy Support
does link look ok /torrent?id=
need help — 2022-01-17 14:42:52 in General Chat
post the $curr array or print_r($curr);
Bug Tracker — 2022-01-17 14:32:06 in M-BiTsy Support
for exceptions the code has debug on and any details of errors can be found on admincp - sql error when it says
Oops somwthing went wrong, Admin have been notified if this continues please contact a member of staff. Thank you

thats just to hide the error from the user which may have sensitive info on,  errors should always be private for admin only
errors on the admincp should be copied & cleaned. The site has simple errors but for testing the debug is really detailed



for the edit torrent i cant get that error so the debug will help
is this the correct path home/.........../public_html/test/index.php  should be home/public_html/index.php the data & app folders are not with index,php if not in public_html htaccess needs editing view install notes or send image of your file structure
need help — 2022-01-16 20:24:52 in General Chat
        $dcc = 4;
       for ($i = 0; $i <= $dcc; $i++) {
           if($i==$dcc){
               $sel = ['name'=> $curr[$i], 'size'=>$curr_len];
               $arr;
           }elseif($i=='0'){
              $arr = ['dir'=>$curr[$i],'files'=>''];
              //print_r($arr);
           }else{
              //$sel = ['dir'=>$curr[$i],'files'=>''];
              $arr['files'] = ['dir'=>$curr[$i],'files'=>''];
           }
       }
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728