Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=109)
-   -   External torrents (http://www.bvlist.com/showthread.php?t=6829)

Fynnon 3rd August 2011 17:20

External torrents
 
attention

Attention



this is for TBDev 2009





With this mod, you can upload torrents, downloaded from other trackers, directly to your tracker.
Private-Flag is set, a new unique-ID is written in the torrent to keep your tracker privat.


in lang_takeupload.php add:

PHP Code:

'takeupload_write_torrent' => "Error while opening torrent file on server (writing not allowed). Please inform the staff."


in takeupload.php find:

PHP Code:

if (!isset($dict))
      
stderr($lang['takeupload_failed'], $lang['takeupload_not_benc']); 


and below it ADD:

PHP Code:

//=== external torrent
    // For the use of external torrents, we have to do some changes:
    // Add private flag to prevent clients from sharing the peers with other clients.
    
$dict["value"]["announce"] = array("type" => "string""value" => $TBDEV["announce_urls"][0]);
    
$dict["value"]["info"]["value"]["private"] = array("type" => "integer""value" => "1");
    
// Adding a different random ID will prevent every other peer-sharing client
    // (e.g. BitComet) from finding other peers for this torrent, since the infohash is unique.
    
function mksecret($len 20)
     {
      
$ret "";
      for (
$i 0$i $len$i++)
      
$ret .= chr(mt_rand(0255));
      return 
$ret;
     } 
    
$dict["value"]["info"]["value"]["unique id"] = array("type" => "string""value" => mksecret());
    
// Use the new info string to calculate the hash
    
$infohash pack("H*"sha1(benc($dict["value"]["info"])));
    
//  write the changed, bencoded version of our dictionary.
    
$fhandle fopen($tmpname"wb");
    
$bdict benc($dict);
    if (
$fhandle) {
     
$wb fwrite($fhandle$bdict);
     
fclose($fhandle);
    } else {
     
stderr($lang['takeupload_write_torrent']);
    } 
    unset(
$dict);
    
$dict bdec_file($tmpname$TBDEV['max_torrent_size']);
    if (!isset(
$dict))
      
stderr($lang['takeupload_failed'], $lang['takeupload_not_benc']);
 
//=== end external torrents 

desaster@tbdev.net/topic/24575-external-torrents

bizzarre 11th August 2011 19:53

external torrents
 
I use TBdev 2009. I test this on localhost and don't work.
When i try to download a torrent don't work shows "DHT not allowed"

mpx 17th April 2014 12:05

Failure: torrent not registered with this tracker

http://shrani.si/f/1y/ux/i9155OU/untitled.png

I have this source is the simillar as TBDEV. Any suggestion ?

DND 17th April 2014 12:11

torrent is not registered on the site. means it was deleted.

mpx 17th April 2014 12:13

I know but torrent is show on browse page ...

DND 17th April 2014 12:15

did you 777 chmod the torrents folder?
or did you purged the cache ? nexusphp uses memcache and that's the reason "maybe" the torrent is still showing

mpx 17th April 2014 12:18

yes, i try this mod but is "problem" to show public announce only ours not ... and this is a problem for users. They not be regarded upload/download...

DND 17th April 2014 12:24

ohh I see what you trying to do.
nexusphp is a little modified from the basic tbdev source.

x360zone 17th April 2014 17:31

lol
 
sorry but you think external tracked torrents can be applied to your site with just your announce and adding upload download stats to there accounts
not going to work if thats what you mean

firefly007 17th April 2014 19:21

Quote:

Originally Posted by mpx (Post 44369)
yes, i try this mod but is "problem" to show public announce only ours not ... and this is a problem for users. They not be regarded upload/download...

Post your announce please


All times are GMT +2. The time now is 05:57.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.