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

glad you got it working  :thumb
New theme project — 2021-07-15 07:22:41 in M-BiTsy Support
I have managed to move all forum pages to app/views/forum which has broke it up a bit where before it was just one big file
except the viewtopic page that's pretty complicated lol

If you downloaded 3 days ago I will not be making any big changes except fine tuning and finishing admin panel off

New theme project — 2021-07-15 04:43:51 in M-BiTsy Support
How long ago did you download source ?

All pages should be in the app/views folder

Here is the torrent details app/view/torrent/read.php
Modify Date Function — 2021-07-14 15:52:50 in M-BiTsy Support
Here is a function i added to make modifying dates a little easier, using the php datetime class if anyone using v3 finds it useful

to get current date you can use $TT_TIME = time();   ( i use define = define('TT_TIME', time()); )


       $res = DB::run("SELECT last_time FROM tasks WHERE task='cleanup'")->fetch();
       $result = DB::run("SELECT date FROM shoutbox WHERE msgid=46")->fetch();

       // $type=date/string || $target=sqlresult || $amount=add/sub date
       function modify($type, $target, $amount)
       {
           if ($type == 'date') {
               $date = date_create($target);
               date_modify($date, $amount);
           } elseif ($type == 'time') {
               $date = date_create();
               date_timestamp_set($date, $target);
               date_modify($date, $amount);
           }

           return date_format($date, 'Y-m-d H:i:s');
       }

       echo '<br>1<br>';
       echo modify('date', $result['date'], '-15 minute');

       echo '<br>2<br>';
       echo modify('time', $res['last_time'], '+10 day');

       echo '<br>3<br>';
       echo TT_DATE . '<br>';

       $test = modify('time', $res['last_time'], '-1 hour');
       if ($test > TT_DATE) {
           echo 'false';
       } else {
           echo 'true';
       }



New theme project — 2021-07-14 15:44:38 in M-BiTsy Support
Looking great mate  :thumb
Ajax Auto-Fill User — 2021-07-14 06:42:15 in M-BiTsy Support
Here is a little something i added, there is loads of big search querys in TT which i am trying to remove and came across this which i use currently just for messages

Cant do step by step guide so i added three files test.php and the ajax file, just add database details to database file
Place files in root to see working example and ill go through where to put what

add in css file

#country-list{float:left;list-style:none;margin-top:-3px;padding:0;width:190px;position: absolute;}
#country-list li{padding: 10px; background: #f0f0f0; border-bottom: #bbb9b9 1px solid;}
#country-list li:hover{background:#ece3d2;cursor: pointer;}
#search-box{padding: 10px;border: #a8d4b1 1px solid;border-radius:4px;}


add in header (or with other js)

<script>
$(document).ready(function(){
$("#search-box").keyup(function(){
$.ajax({
type: "POST",
url: "readCountry.php",
data:'keyword='+$(this).val(),
beforeSend: function(){
$("#search-box").css("background","#FFF url(LoaderIcon.gif) no-repeat 165px");
},
success: function(data){
$("#suggesstion-box").show();
$("#suggesstion-box").html(data);
$("#search-box").css("background","#FFF");
}
});
});
});

function userCountry(val) {
$("#search-box").val(val);
$("#suggesstion-box").hide();
}
</script>



PS - if you rename readcountry file you must change the url in the js above url: "readCountry.php",

the form for now i have in mailbox.php for reciever which you can view here https://torrenttrader.uk/messages/create

<input type="text" id="search-box" name="reciever" placeholder="User Name" />
<div id="suggesstion-box"></div>
New Config Approach — 2021-07-08 17:04:18 in M-BiTsy Support
We mentioned the TT installer which i am looking at and some settings would have to be separate to make it easier.
The db name and site name etc so while playing with that i thought about all the other settings.

This is something that i probably wont post for v3 so here is the process in case any one finds it useful this will be added to pdo version this weekend

first include the new config file with the array inside
$config = include APPROOT.'/config/configgg.php';


here is the config array file
<?php
return array (
"DB_HOST", "localhost",
"DB_USER", "torrenttrader",
"DB_PASS", "password",
"DB_NAME", "pdo",
'DB_CHAR' => 'utf8mb4',
'URLROOT' => 'http://localhost/torrenttraderpdo',
'CAPTCHA_ON' => false,
'CAPTCHA_KEY' => 'googlecaptchakey',
'CAPTCHA_SECRET' => 'googlecaptchasecret',
'APPROOT' => dirname(dirname(__FILE__)),
'CACHE' => '../data/cache',
'LANG' => '../data/languages/',
'TORRENTDIR' => '../data/uploads',
'NFODIR' => '../data/uploads',
'BLOCKSDIR' => '../views/blocks',
'IMPORT' => '../data/import',
'LOGGER' => '../data/logs',
'BACUP' => '../data/backups',
'SITENAME' => 'TorrentTraderMVC',
'_SITEDESC' => 'A PHP support forum for Torrent Trader',
'SITEEMAIL' => 'something@email.com',
'VERSION' => 'PDO',
'TT_TIME' => time(),
'TT_DATE' => date("Y-m-d H:i:s"),
'CACHE_TYPE' => 'disk',
'MEMCACHE_HOST' => 'localhost',
'MEMCACHE_PORT' => 11211,
'SITENOTICEON' => true,
'SITENOTICE' => 'Welcome To TorrentTrader MVC/PDO',
'DEFAULTLANG' => 'english',
'DEFAULTTHEME' => 'darktheme',
'CHARSET' => 'utf-8',
'ANNOUNCELIST' => URLROOT . '/announce.php',
'MEMBERSONLY' => true,
'MEMBERSONLY_WAIT' => true,
'ALLOWEXTERNAL' => true,
'UPLOADERSONLY' => false,
'INVITEONLY' => false,
'ENABLEINVITES' => true,
'CONFIRMEMAIL' => false,
'ACONFIRM' => false,
'ANONYMOUSUPLOAD' => false,
'PASSKEYURL' => URLROOT . '/announce.php?passkey=%s',
'UPLOADSCRAPE' => true,
'FORUMS' => true,
'FORUMS_GUESTREAD' => false,
'OLD_CENSOR' => false,
'MAXUSERS' => 20000,
'MAXUSERSINVITE' => 50000,
'CURRENCYSYMBOL' => '£',
'BONUSPERTIME' => 0.1,
'ADDBONUS' => 3600,
'FORCETHANKS' => false,
'ALLOWLIKES' => true,
'BANNED_AGENTS' => '-AZ21, -BC, LIME',
'IMAGEMAXFILESIZE' => 524288,
'ALLOWEDIMAGETYPES' => array(
   "image/gif" => ".gif",
   "image/pjpeg" => ".jpg",
   "image/jpeg" => ".jpg",
   "image/jpg" => ".jpg",
   "image/png" => ".png",
),

'SITE_ONLINE' => true,
'OFFLINEMSG' => 'Site is down for a little while',
'WELCOMEPM_ON' => true,
'WELCOMEPM_MSG' => 'Thank you for registering at our tracker! Please remember to keep your ratio at 1.00 or greater',
'UPLOADRULES' => 'You should also include a .nfo file wherever possible<br />Try to make sure your torrents are well-seeded for at least 24 hours<br />Do not re-release material that is still active',
'ISURL' => array('login', 'logout', 'signup'),
'LEFTNAV' => true,
'RIGHTNAV' => true,
'MIDDLENAV' => true,
'SHOUTBOX' => true,
'NEWSON' => true,
'DONATEON' => true,
'DISCLAIMERON' => true,
'CLASS_WAIT' => 1,
'GIGSA' => 1,
'RATIOA' => 0.50,
'A_WAIT' => 24,
'GIGSB' => 3,
'RATIOB' => 0.65,
'B_WAIT' => 12,
'GIGSC' => 5,
'RATIOC' => 0.80,
'C_WAIT' => 6,
'GIGSD' => 7,
'RATIOD' => 0.95,
'D_WAIT' => 2,
'PEERLIMIT' => 10000,
'AUTOCLEANINTERVAL' => 600,
'LOGCLEAN' => 28 * 86400,
'ANNOUNCEINTERVAL' => 900,
'SIGNUPTIMEOUT' => 259200,
'MAXDEADTORRENTTIMEOUT' => 21600,
'RATIOWARNENABLE' => true,
'RATIOWARNMINRATIO' => 0.4,
'RATIOWARN_MINGIGS' => 4,
'RATIOWARN_DAYSTOWARN' => 14,
'TORRENTTABLE_COLUMNS' => 'category,name,dl,magnet,tube,imdb,uploader,comments,size,seeders,leechers,health,external,added',
'TORRENTTABLE_EXPAND' => '',
'mail_type' => 'php',
'mail_smtp_host' => 'localhost',
'mail_smtp_port' => 25,
'mail_smtp_ssl' => false,
'mail_smtp_auth' => false,
'mail_smtp_user' => '',
'mail_smtp_pass' => '',
'_USER' => 1,
'_POWERUSER' => 2,
'_VIP' => 3,
'_UPLOADER' => 4,
'_MODERATOR' => 5,
'_SUPERMODERATOR' => 6,
'_ADMINISTRATOR' => 7,
'FORUMONINDEX' => true,
'IPCHECK' => true,
'ACCOUNTMAX' => 1,
'IMDB1' => true,
'YOU_TUBE' => true,
'FREELEECHGBON' => true,
'FREELEECHGB' => 8589934592,
'REQUESTSON' => true,
'HIDEBBCODE' => true,
'HNR_ON' => false,
'HNR_DEADLINE' => 7 * 86400,
'HNR_SEEDTIME' => 172800,
'HNR_WARN' => 5,
'HNR_STOP_DL' => 5,
'HNR_BAN' => 50,
'HNR_DISABLED' => TRUE,
)
?>


Next i use a class with static method - just so i dont have to include global every where
<?php
class Config
{

   public static function TT()
   {
       global $config;
       return $config;
   }

}


all instances of $site_config need to be changed for example $site_config['siteurl'] becomes Config::TT()['siteurl']

now the array file is all set we can manage in admincp page - here is the simple way for example

<?php
// do some checks - for username ?
       if ($_SESSION["control_panel"] != "yes" || $_SESSION["username"] != "mjay") {
           Redirect::to(URLROOT . "/logout");
       }
// get form input all post input names need to match array key name
if ($_POST) {
       file_put_contents(
           APPROOT.'/config/configgg.php',
           "<?php\nreturn " . var_export($_POST, true) . "\n?>"
       );
}

// now the form this is just the version example - still need to finish this just repeat input form for each config setting
<?php
echo Config::TT()['VERSION'];
?>
<form method="post" action="' . URLROOT . '/adminconfig/submit">
<div class="row justify-content-md-center">
<div class="col-md-8">';
////////////////////////////////////
// example for config setting array
<center><label for="ttversion">TTversion:</label><br></center>
<input type="text"  class="form-control" id="ttversion" name="ttversion" value="<?php echo Config::TT()['VERSION'] ?>">
////////////////////////////////////
<br><br>
<center><input type="submit"  class="btn btn-sm ttbtn" value="Submit"></center>
</div>
</div>
</form>



Here is the start of the installer

the url/install/index.php
<?php
// get any files we need & the installer class
include 'installer.php';
include '../../app/config/config.php';
include '../../app/libraries/DB.php';

// use $_get to set step
$Step = $_GET['step'] ?? 0;

// call the installer
$Installer = new Installer();

// run everything through installer class
if ($Step == 1) {
   $Installer->step1();
} elseif ($Step == 2) {
   $Installer->step2();
} elseif ($Step == 3) {
   $Installer->step3();
} elseif ($Step == 4) {
   $Installer->step4();
} elseif ($Step == 5) {
   $Installer->step5();
} else {
   $Installer->index();
}


the installer class im thinking just forms and extension checks a bit like check.php but also a few methods to install sql

just stated working on this
<?php
class Installer
{

   public function index()
   {
     $html =  '<!DOCTYPE html>
<html>
<head>
<style>
.center {
 margin: auto;
 width: 60%;
 border: 3px solid #73AD21;
 padding: 10px;
}
</style>
</head>
<body>

<center><h2>Lets do some checks</h2><center>
<form method="post" action="index.php?step=1">
<div class="center">
 //   database details use session so set on all pages
 <input type="submit" value="Submit">
</div>
</form>
</body>
</html>';
echo $html;
   }

   public function step1()
   {
       $sql = file_get_contents('Full Database.sql');
       $qr = DB::exec($sql);
   }

}

TorrentTrader 3.0 — 2021-07-06 07:27:27 in v3 Download
I can't test but if I remember above query add

$filecounts = (int) $filecount;


Then in query ( line 208 ) find $filecount and add s to the end to become $filecounts
Bug Tracker — 2021-07-05 10:24:52 in M-BiTsy Support
Always happy for feedback and bugs reported
Style has been a pain since changing to bootstrap, it depends a lot on screen size if you rotate you mobile to side the edit post button will appear and  ill have another look at the columns

The files are much more secure outside of public html folder where they can't be accessed by users or guest
great stuff  :thumb  working my way the models which was the last thing to do, finishing off every file as i go ready for first final release.

Then ill concentrate more on the mods
switching to https? — 2021-06-27 06:37:41 in v3 Support
for https you can just change the config url

with https sometimes you can use http or https unless you force it on the ht.access - with old torrents you can make a exception for announce.php on the ht.access so you would have
http.announce  and then
the new https.announce  one

all other visits would be forced https.
You can visit here with http or https if you want to try, i dont force it on the github project but all the links point to https through the config setting if on browser = right click inspect your account button :thumb

From what i remember you can get some errors if you right click on browser - inspect page in console you can get a few errors that a path is not correct this will be scripts or css thats called in header/footer,  like if the jquery link is http just switch them to https aswell - if you get a page but no style that will be the issue mate.
All forum posts — 2021-06-19 18:22:10 in General Chat
Try add this at top under <?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

TT Scraper — 2021-06-19 15:39:50 in M-BiTsy Support
Updating my current progress to github so here is what i have so far

Include the 3 classes in backed/functions.php

require_once(BACKEND."/Scraper.php"); // Mail functions
require_once(BACKEND."/Torrent.php");
require_once(BACKEND."/Tscraper.php");


Thats
the rw-torrent class https://github.com/darkalchemy/Torrent-RW
the scrapeer class https://github.com/medariox/scrapeer

One i put to gether for TT to scrape by id or 10 at a time

<?php

class Tscraper
{
   public static function ScrapeId($id)
   {
       $torrent = new Torrent(TORRENTDIR . "/$id.torrent");
       try {
           $scraped = $torrent->scrape();
       } catch (\Exception $e) {
           //$scraped = $torrent->errors();
           //exit();
       }
       $myarray = array_shift($scraped);

       $seeders = $leechers = $completed = 0;
       if ($myarray['seeders'] > 0) {
           $seeders = $myarray['seeders'];
       }
       if ($myarray['leechers'] > 0) {
           $leechers = $myarray['leechers'];
       }
       if ($myarray['completed'] > 0) {
           $completed = $myarray['completed'];
       }

       if ($seeders !== null) {
           // Update the Torrent
           DB::run(" UPDATE torrents
                             SET leechers = ?, seeders = ?, times_completed = ?, last_action = ?, visible = ?
                             WHERE id = ?",
                             [$leechers, $seeders, $completed, TimeDate::get_date_time(), 'yes', $id]
           );
       } else {
           // Its Dead :(
           DB::run("UPDATE torrents SET last_action = ? WHERE id=?", [TimeDate::get_date_time(), $id]);
       }
   }

   public static function scrapeall()
   {
       // Set A time limit ? how fast is your server ?
       //set_time_limit(15);

       // Rescrape torrents every x seconds. (Default: 2 days)
       $stmt = DB::run("SELECT `id`, `info_hash`, `last_action`
                        FROM `torrents`
                        WHERE `external` = 'yes'
                        AND `last_action` <= DATE_SUB(UTC_TIMESTAMP(), INTERVAL 1 DAY) LIMIT 10");

       foreach ($stmt as $tor) {
           self::ScrapeId($tor['id']);
       }
   }
}


then on torrent-import i have this

                   //EXTERNAL SCRAPE
                   if ($external == 'yes' && UPLOADSCRAPE) {
                       Tscraper::ScrapeId($id);
                   }


on torrent-upload

           //Uploaded ok message
           if ($external == 'no') {
               $message = sprintf(Lang::T("TORRENT_UPLOAD_LOCAL"), $name, $id, $id);
           } else {
               $message = sprintf(Lang::T("TORRENT_UPLOAD_EXTERNAL"), $name, $id);
               // scrape external
               Tscraper::ScrapeId($id);
           }


Scrapethis.php i use form at minute but this should be on template like onclick or if $_post this is where namesspace causes headache torrent class 1 in torrent class 2 lol ill have to rename one of them
       $id = $_GET['id'];
                if ($_SESSION["view_torrents"] != "yes") {
                     Session::flash('info', Lang::T("NO_TORRENT_VIEW"), URLROOT . "/home");
                }
                Tscraper::ScrapeId($id);
               Redirect::autolink(URLROOT . "/torrent?id=$id", Lang::T("The Tracker is Updated"));


And then the what to show based on time

       $now = TimeDate::gmtime();
       $ts = $row['last_action'];
       if ($ts + 172800 > $now) {
           $scraper = "
           <br><b>" . Lang::T("EXTERNAL_TORRENT") . "</b>
           <form action='".URLROOT."/Scrapethis?id=".$id."' method='post'>
           <button type='submit' class='btn btn-warning center-block' value=''>". Lang::T("Update Stats")."</button>
           </form>";
       } else {
           $scraper = "<br>
           <br><b>" . Lang::T("EXTERNAL_TORRENT") . "</b>
           <font  size='4' color=#ff9900><b>Stats Recently Updated</b></font>";
       }

// Scrape External Torrents
       if ($torr["external"] == 'yes') {
           echo $scraper;
       }


Then Any Where we can place scrape
Place anywhere in cleanup.php for example
Tscraper::scrapeall();


Just thought you could even put limit in config so you can alter number of torrents scraped
Tscraper::scrapeall($limit = $site_config['scrapelimit']);

Test Announce Speeds — 2021-06-19 08:23:16 in General Chat
Ive been reading through the BitTorrent Specification wiki working though my announce and its pretty much finished just want to test the speed so if anyone has a test server and 2 minutes spare please try and post you announce speed

Mine seems just a little faster then the original v3 one i converted - but would be nice to compare with other setups - although i know server will play some part.

Code is for v3 - dont try this on live site it will stop all torrents - they start again after removing edits

In announce.php under the first line <?php add
$GLOBALS['tstart'] = array_sum(explode(" ", microtime()));


find at the bottom
// NOW BENC THE DATA AND SEND TO CLIENT???


add above

$totaltime = array_sum(explode(" ", microtime())) - $GLOBALS['tstart'];
err("$totaltime");


Now in client pause & resume a torrent a few times to get the speed - speed will show in client message
Then remove the edits  :thumb
All forum posts — 2021-06-19 08:09:35 in General Chat
I can not test but i tried converting for v3 if no one else can help
im sure mod was posted on TT.org for v3  

The links and images wont work but if it loads its a good starting point lets see if the page shows first lol
create userforumpost.php

<?php
require_once("backend/functions.php");
dbconn();
       $id = (int) ($_GET["id"] ?? 0);
       if (!isset($id) || !$id) {
autolink('home', "no id");
       }

$res = SQL_Query_exec("SELECT
           forum_posts.id, topicid, userid, forum_posts.added, body,
           avatar, signature, username, title, class, uploaded, downloaded, privacy, donated
           FROM forum_posts
           LEFT JOIN users
           ON forum_posts.userid = users.id
           WHERE userid = $id ORDER BY forum_posts.userid "); //$limit
$row = mysqli_fetch_assoc($res);
       if (!$row) {
autolink('home', "User has not posted in forum");
       }
       $title = T_("COMMENTSFOR") . "<a href='profile?id=" . $row['userid'] . "'> $row[username]</a>";

stdhead($title);
begin_frame($title);
       while ($row = mysqli_fetch_assoc($res))) {

           $postername = $row["username"];
           if ($postername == "") {
               $postername = T_("DELUSER");
               $title = T_("DELETED_ACCOUNT");
               $avatar = "";
               $usersignature = "";
               $userdownloaded = "";
               $useruploaded = "";
           } else {
               $privacylevel = $row["privacy"];
               $avatar = htmlspecialchars($row["avatar"]);
               $title = format_comment($row["title"]);
               $usersignature = stripslashes(format_comment($row["signature"]));
               $userdownloaded = mksize($row["downloaded"]);
               $useruploaded = mksize($row["uploaded"]);
           }

           if ($row["downloaded"] > 0) {
               $userratio = number_format($row["uploaded"] / $row["downloaded"], 2);
           } else {
               $userratio = "---";
           }

           if (!$avatar) {
               $avatar = "/images/default_avatar.png";
           }

           $commenttext = format_comment($row["body"]);

           $edit = null;
           if ($CURUSER["edit_torrents"] == "yes" || $CURUSER["edit_news"] == "yes" || $CURUSER['id'] == $row['user']) {
               $edit = '[<a href="forums/editpost&postid=' . $row['id'] . '">Edit</a>] ';
           }

           $delete = null;
           if ($CURUSER["delete_torrents"] == "yes" || $CURUSER["delete_news"] == "yes") {
               $delete = '[<a href="forums/deletepost&postid=' . $row['id'] . '&sure=0">Delete</a>] ';
           }

           print('<div><table style="border: 1px solid black" >');
           print('<thead><tr">');
           print('<th align="center" width="150"></th>');
           print('<th align="right">' . $edit . $delete . '[<a href="report/forum?forumid=' . $row['topicid'] . '&forumpost=' . $row['id'] . '">Report</a>] Posted: ' . date("d-m-Y \\a\\t H:i:s", utc_to_tz_time($row["added"])) . '<a id="comment' . $row["id"] . '"></a></th>');
           print('</tr></thead>');
           print('<tr valign="top">');
           if ($CURUSER['edit_users'] == 'no' && $privacylevel == 'strong') {
               print('<td align="left" width="150"><center><a href="profile?id=' . $row['id'] . '"><b>' . $postername . '</b></a><br /><i>' . $title . '</i><br /><img width="80" height="80" src="' . $avatar . '" alt="" /><br /><br />Uploaded: ---<br />Downloaded: ---<br />Ratio: ---<br /><br /><a href="profile?id=' . $row["user"] . '"><img src="themes/default/forums/icon_profile.png" border="" alt="" /></a> <a href='messages/create?id=' . $row["user"] . '"><img src="themes/default/forums/icon_pm.png" border="0" alt="" /></a></center></td>');
           } else {
               print('<td align="left" width="150"><center><a href="profile?id=' . $row['id'] . '"><b>' . $postername . '</b></a><br /><i>' . $title . '</i><br /><img width="80" height="80" src="' . $avatar . '" alt="" /><br /><br />Uploaded: ' . $useruploaded . '<br />Downloaded: ' . $userdownloaded . '<br />Ratio: ' . $userratio . '<br /><br /><a href="profile?id=' . $row["user"] . '"><img src="themes/defualt/forums/icon_profile.png" border="0" alt="" /></a> <a href="/messages/create?id=' . $row["user"] . '"><img src="themes/default/forums/icon_pm.png" border="0" alt="" /></a></center></td>');
           }

           print('<td>' . $commenttext . '<hr />' . $usersignature . '</td>');
           print('</tr>');
           print('</table></div>');
       }
       end_frame();
       stdfoot();


then search YOURSITEURL/userforumpost.php?id=1 ( i assume your id is one )
hopefully we see something then we fix the links
TT Scraper — 2021-06-18 13:50:00 in M-BiTsy Support
I'd personally stay away from the old TT one
While I got it working its a bit outdated. The second post is better option and can be simplified to a function
Also moving forward using the torrent-rw class it makes sense to use the scraper

Something like this in function passing id as var
[
                       $torrent = new Torrent( "uploads/$id.torrent");
                      try {
                          $scraped = $torrent->scrape();
                      } catch (Exception $e) {
                          $scraped = $torrent->errors();
                          exit();
                      }
                      $myarray = array_shift($scraped);

                      $seeders = $leechers = $completed = 0;
                      if ($myarray['seeders'] > 0) {
                          $seeders = $myarray['seeders'];
                      }
                      if ($myarray['leechers'] > 0) {
                          $leechers = $myarray['leechers'];
                      }
                      if ($myarray['completed'] > 0) {
                          $completed = $myarray['completed'];
                      }
                      if ($seeders !== null) {
                          // Update the Torrent
                  SQL_Query_exec("
                  UPDATE torrents
                  SET leechers = $leechers, seeders = $seeders, times_completed = $completed, last_action = get_date_time(), visible =  'yes'
                  WHERE id = $id");
                      }
                  }
                  //END SCRAPE


Just playing with it at minute thinking of adding scraperfunction($id, $all = 0)

So with $all = 1 it will scrape 100 torrents by updated date and age so it's all in one tidy small class function

Will probably  return scrape array then it's simple function call in any page, cleanup or wherever
Bug Tracker — 2021-06-17 17:44:14 in M-BiTsy Support
not really paid much attention to the querys for them so before i check im up for another opinion

uploaded (maybe change to torrents) this is like upload history
Show all users uploaded torrents including any dead or old ones

seeding (maybe change to active)
Show all current active torrents - seeding & leeching ?

Or the two can be combined - as admin we can view all dead torrents and remove them if necessary in the admincp i dont see point keeping old torrents it depends what we want to show do we want a users upload history ? - bare in mind other users with permission will see these

Tracking everything can be done in admincp - so what do we want to show other members
Bug Tracker — 2021-06-17 13:33:21 in M-BiTsy Support
For imgur upload you can use link above smilies and select get share links



Then bbcode forums




All torrents user is currently seeding
All torrents user has uploaded
TT Scraper — 2021-06-15 20:46:08 in M-BiTsy Support
Here is a test page for the new scraper from the second post for users to try on v3 - just edit the torrent id

create test.php

<?php
require_once("backend/Scraper.php");
require_once("backend/Torrent.php");

// change this id from 7
$file    = 'uploads/7.torrent';

$torrent = new Torrent($file);
       try {
           $scraped = $torrent->scrape();
       } catch (Exception $e) {
           $scraped = $torrent->errors();
           exit();
       }
       $myarray = array_shift($scraped);

echo $myarray['completed'].'<br>';
echo $myarray['leechers'].'<br>';
echo $myarray['seeders'].'<br>';
TT Scraper — 2021-06-15 20:07:32 in M-BiTsy Support
the main difference for v3 in the first post is this query
               DB::run("
              UPDATE torrents
              SET leechers = ?, seeders = ?, times_completed = ?, last_action = ?, visible = ?
              WHERE id = ?",
                  [$leechers, $seeders, $downloaded, TimeDate::get_date_time(), 'yes', $id]);


there is no mega scrape yet but in my pdo version the plan is everytime a user visits torrent details, torrent edit, torrent delete it will scrape 10 torrents per time i do this by using AND last_edit LIMIT 10

the first post is based on the v3 scraper posted by micromonkey i had a quick look through post and i hope its just the update torrent query that needs changing the second post is what is the new scraper used in my MVC/PDO version  :thumb
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