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

Blackjack 3.0 — 2026-10-10 04:50:49 in v3 Mods Completed
I think you may have to rethink your sql if you are executing that against what I posted on github
v3.8.3 first findings — 2026-10-07 22:23:43 in Bugs
find in polls_block
if ($arr["sort"] == "yes")
   usort($os, srt);


replace with
if ($arr["sort"] == "yes")
   usort($os, 'srt');


new php dont like srt unquoted.
Multiplayer poker — 2026-10-04 19:35:16 in v3 Mods Completed
nice catch. github will be updated
Multiplayer poker — 2026-09-19 20:04:07 in v3 Mods Completed
Nice. Let me know if you find any problems  👍
Multiplayer poker — 2026-09-11 22:36:44 in v3 Mods Completed
I posted some code a few years ago that I had that worked way back in the day, but stopped due to php updates. I always thought this would a be a fun thing to have on your site. I used AI to help line up things and do what would take me years by myself. This is fun. This is only for use on TTv3 core. Meaning the core functions of TT need to exist, so if you have any custom base that moved away from the core, this wont just plug in. This is a multiplayer poker game that you can have on your tracker and maybe have some fun with other players and members. Im posting this AS-IS so try it and have fun https://github.com/MicrosoulV3/FT-Multiplayer-Poker
Blackjack 3.0 — 2026-09-10 16:47:56 in v3 Mods Completed
screen
Blackjack 3.0 — 2026-09-09 20:56:18 in v3 Mods Completed
New blackjack game. I have the old game where you play against other players. If noone else plays, the game just sits there and nothing happens. That game was old anyways. This one here is against the house, with proper card splitting and double down etc. You are betting upload credit. Php 8.x compatible. Blackjack and html go in the root, and the images and sounds have the path set in the folder. SQL included. Tested on TTv3

IGNORE THE ATTACHMENT IN THIS POST. i CANT EDIT IT BECAUSE THIS SITE IS SEMI BROKEN. HERE IT IS https://github.com/MicrosoulV3/Blackjack-3.x
v3.8.3 first findings — 2026-09-07 20:13:22 in Bugs
php.ini file should be removed. Its only there to read the server php settings and should be removed after testing.
Full worked script is done — 2026-08-29 05:37:52 in Download
Looks very nice. Create a github and upload it to that, then you can just fix files as you know 👍
Yes, that is what I am doing. I just added it as a new function. internal calls dont need to be prepared, but user input does, so I have been testing. so far so good. thanks spirit. Here is what I am testing in my account-signup file. Intelliphense formats code weirdly to me lol, but ok. I rewrote my login and recover pages the long way and redid the code for prepared, but I wanted to see if this would be easier.
<?php
require_once "backend/functions.php";
dbconn();
if (session_status() !== PHP_SESSION_ACTIVE) {
   session_start();
}
$site_config["LEFTNAV"] = $site_config["MIDDLENAV"] = $site_config["RIGHTNAV"] = false;
$username_length = 40;
$password_minlength = 6;
$password_maxlength = 40;
$invite_row = null;

// Disable checks if signing up with an invite
$invite_id = $_GET['invite'] ?? 0;
$secret    = $_GET['secret'] ?? '';

if (!is_valid_id($invite_id) || strlen($secret) !== 32) {
   if ($site_config["INVITEONLY"]) {

       echo '<!DOCTYPE html>
<html>
<head>
   <title>Access Denied</title>
   <script>
       alert("This site is invite only.\\n\\nThe invite link you used is invalid or missing.");
       window.location.href = "index.php";
   </script>
</head>
<body>
   <noscript>
       <h2>This site is invite only</h2>
       <p>The invite link you used is invalid. <a href="index.php">Click here to return to the homepage</a>.</p>
   </noscript>
</body>
</html>';
       die();
   }

   // If not invite only, continue with normal signup but check if site is full
   $numsitemembers = get_row_count("users");
   if ($numsitemembers >= $site_config["maxusers"])
       show_error_msg(T_("SORRY") . "...", T_("SITE_FULL_LIMIT_MSG") . number_format($site_config["maxusers"]) . " " . T_("SITE_FULL_LIMIT_REACHED_MSG") . " " . number_format($numsitemembers) . " members", 1);
} else {
   $stmt = SQL_Query_prepared(
       "SELECT id
    FROM users
    WHERE id = ?
    AND MD5(secret) = ?",
       "is",
       [
           (int)$_REQUEST["invite"],
           $_REQUEST["secret"]
       ]
   );
   $invite_row = mysqli_fetch_assoc($stmt);

   if (!$invite_row) {
       show_error_msg(T_("ERROR"), T_("INVITE_ONLY_NOT_FOUND") . " " . ($site_config['signup_timeout'] / 86400) . " days.", 1);
   }
}

if ($_GET["takesignup"] == "1") {

   // RECAPTCHA v3 verification
   $recaptcha_token = $_POST['recaptcha_response'] ?? '';

   $verify_url = "https://www.google.com/recaptcha/api/siteverify";
   $secret = $site_config["RECAPTCHA_SECRET_KEY"];

   $recaptcha_response = file_get_contents($verify_url . "?secret=" . $secret . "&response=" . $recaptcha_token);
   $recaptcha_data = json_decode($recaptcha_response, true);

   $score = $recaptcha_data["score"] ?? 0;
   $action = $recaptcha_data["action"] ?? 'unknown';
   $ip = $_SERVER['REMOTE_ADDR'];
   $user_agent = $_SERVER['HTTP_USER_AGENT'];
   $user_id = null; // Will be null before account creation
   $email = $_POST['email'] ?? null;
   $username = $_POST['wantusername'] ?? null;

   // Insert log into database
   SQL_Query_prepared(
       "INSERT INTO recaptcha_logs
   (
       user_id,email,username,
       score,action,ip,
       user_agent,created_at
   )
   VALUES
   (
       ?,?,?,?,?,?,?,?
   )",
       "issdssss",
       [
           null,
           $email,
           $username,
           $score,
           $action,
           $ip,
           $user_agent,
           get_date_time()
       ]
   );

   // Block signup if score is too low
   if (!$recaptcha_data["success"] || $score < 0.5) {
       show_error_msg("Signup Failed", "reCAPTCHA verification failed. Your activity seems suspicious.", 1);
       die();
   }


   function validusername(string $username): bool
   {
       $length = strlen($username);
       return $length >= 3 && $length <= 40 && ctype_alnum($username);
   }

   $wantusername = $_POST["wantusername"];
   $email = $_POST["email"];
   $wantpassword = $_POST["wantpassword"];
   $passagain = $_POST["passagain"];
   $country = $_POST["country"];
   $gender = $_POST["gender"];
   $client = $_POST["client"];
   $age = (int) $_POST["age"];

   $message = '';
   if (empty($wantpassword) || (empty($email) && !$invite_row) || empty($wantusername))
       $message = T_("DONT_LEAVE_ANY_FIELD_BLANK");
   elseif (strlen($wantusername) > $username_length)
       $message = sprintf(T_("USERNAME_TOO_LONG"), $username_length);
   elseif ($wantpassword != $passagain)
       $message = T_("PASSWORDS_NOT_MATCH");
   elseif (strlen($wantpassword) < $password_minlength)
       $message = sprintf(T_("PASS_TOO_SHORT"), $password_minlength);
   elseif (strlen($wantpassword) > $password_maxlength)
       $message = sprintf(T_("PASS_TOO_LONG"), $password_maxlength);
   elseif ($wantpassword == $wantusername)
       $message = T_("PASS_CANT_MATCH_USERNAME");
   elseif (!validusername($wantusername))
       $message = "Invalid username.";
   elseif (!$invite_row && !validemail($email))
       $message = "That doesn't look like a valid email address.";

   if ($message == "") {
       if (!$invite_row) {
           $maildomain = (substr($email, strpos($email, "@") + 1));

           $stmt = SQL_Query_prepared(
               "SELECT COUNT(*)
    FROM email_bans
    WHERE mail_domain = ?",
               "s",
               [$email]
           );
           $a = mysqli_fetch_row($stmt);

           if ((int)$a[0] !== 0) {
               $message = sprintf(T_("EMAIL_ADDRESS_BANNED_S"), $email);
           }

           $stmt = SQL_Query_prepared(
               "SELECT COUNT(*)
    FROM email_bans
    WHERE mail_domain LIKE ?",
               "s",
               ["%{$maildomain}%"]
           );
           $a = mysqli_fetch_row($stmt);

           if ((int)$a[0] !== 0) {
               $message = sprintf(T_("EMAIL_ADDRESS_BANNED_S"), $email);
           }

           $stmt = SQL_Query_prepared(
               "SELECT COUNT(*)
    FROM users
    WHERE email = ?",
               "s",
               [$email]
           );
           $a = mysqli_fetch_row($stmt);

           if ((int)$a[0] !== 0) {
               $message = sprintf(T_("EMAIL_ADDRESS_INUSE_S"), $email);
           }

           $stmt = SQL_Query_prepared(
               "SELECT COUNT(*) AS total
    FROM users
    WHERE username = ?",
               "s",
               [$wantusername]
           );

           $row = mysqli_fetch_assoc($stmt);

           if ($row['total'] > 0) {
               $message = sprintf(T_("USERNAME_INUSE_S"), $wantusername);
           }
       }

       if ($site_config["ipcheck"] && $site_config["accountmax"] >= "1") {
           $ip = $_SERVER['REMOTE_ADDR'];
           $stmt = SQL_Query_prepared(
               "SELECT COUNT(*)
    FROM users
    WHERE ip = ?",
               "s",
               [$ip]
           );

           $row = mysqli_fetch_row($stmt);
           $ipq = (int)$row[0];
           if ($ipq >= $site_config["accountmax"])
               $message = $site_config["SITENAME"] . " only allows " . $site_config["accountmax"] . " user account per IP address. <br> If you want to create a new account, please contact an administrator.<br /><br /><font color=red> The limit for ip : $ip has been reached.</font><br /><br />Registration failed. <br /><a style='cursor: pointer;cursor:hand;' href='account-login.php'><font color=red>Click here to return to the login page.</font></a>";
       }

       $secret = mksecret();
       $wantpassword = passhash($wantpassword);

       if ($message != "")
           show_error_msg(T_("SIGNUP_FAILED"), $message, 1);

       if ($message == "") {

           if ($invite_row) {
               SQL_Query_prepared(
                   "UPDATE users
    SET username = ?,
        password = ?,
        secret = ?,
        status = 'confirmed',
        added = ?
    WHERE id = ?",
                   "ssssi",
                   [
                       $wantusername,
                       $wantpassword,
                       $secret,
                       get_date_time(),
                       (int)$invite_row['id']
                   ]
               );
               if ($site_config["WELCOMEPMON"]) {
                   $dt = sqlesc(get_date_time());
                   $msg = sqlesc($site_config["WELCOMEPMMSG"]);
                   SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $invite_row[id], $dt, $msg, 0)");
               }
               header("Refresh: 0; url=account-confirm-ok.php?type=confirm");
               die;
           }

           if ($site_config["CONFIRMEMAIL"]) {
               $status = "pending";
           } else {
               $status = "confirmed";
           }

           if ($numsitemembers == '0') {
               $signupclass = 8;
           } else {
               $signupclass = 1;
           }

           $seedbonus = 0.0;
           $selectedCountryName = $_POST["country"] ?? '';
           if (!empty($selectedCountryName)) {
               $stmt = SQL_Query_prepared(
                   "SELECT id
    FROM countries
    WHERE name = ?
    LIMIT 1",
                   "s",
                   [$selectedCountryName]
               );

               $countryData = mysqli_fetch_assoc($stmt);
               $countryValue = $countryData ? (int)$countryData['id'] : 0;
           } else {
               $countryValue = 0;
           }

           SQL_Query_prepared(
               "INSERT INTO users
   (
       username,
       password,
       seedbonus,
       secret,
       email,
       status,
       added,
       last_access,
       age,
       country,
       gender,
       client,
       stylesheet,
       uploaded,
       downloaded,
       language,
       invites,
       class,
       ip
   )
   VALUES
   (
       ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
   )",
               "ssdsssssiisssdisiss",
               [
                   $wantusername,
                   $wantpassword,
                   $seedbonus,
                   $secret,
                   $email,
                   $status,
                   get_date_time(),
                   get_date_time(),
                   $age,
                   $countryValue,
                   $gender,
                   $client,
                   $site_config["default_theme"],
                   $site_config["new_member_upload_ratio"],
                   0,
                   $site_config["default_language"],
                   $site_config["new_member_invites"],
                   $signupclass,
                   getip()
               ]
           );

           $id = mysqli_insert_id($GLOBALS["DBconnector"]);
           $psecret = md5($secret);
           $thishost = $_SERVER["HTTP_HOST"];
           $thisdomain = preg_replace('/^www\./is', "", $thishost);

           if ($site_config["ACONFIRM"]) {
               $body = T_("YOUR_ACCOUNT_AT") . " " . $site_config['SITENAME'] . " " . T_("HAS_BEEN_CREATED_YOU_WILL_HAVE_TO_WAIT") . "\n\n" . $site_config['SITENAME'] . " " . T_("ADMIN");
           } else {
               $body = T_("YOUR_ACCOUNT_AT") . " " . $site_config['SITENAME'] . " " . T_("HAS_BEEN_APPROVED_EMAIL") . "\n\n " . $site_config['SITEURL'] . "/account-confirm.php?id=$id&secret=$psecret\n\n" . T_("HAS_BEEN_APPROVED_EMAIL_AFTER") . "\n\n " . T_("HAS_BEEN_APPROVED_EMAIL_DELETED") . "\n\n" . $site_config['SITENAME'] . " " . T_("ADMIN");
           }

           if ($site_config["CONFIRMEMAIL"]) {
               sendmail($email, "Your $site_config[SITENAME] User Account", $body, "", "-f$site_config[SITEEMAIL]");
               header("Refresh: 0; url=account-confirm-ok.php?type=signup&email=" . urlencode($email));
           } else {
               header("Refresh: 0; url=account-confirm-ok.php?type=noconf");
           }

           if ($site_config["WELCOMEPMON"]) {
               $dt = sqlesc(get_date_time());
               $msg = sqlesc($site_config["WELCOMEPMMSG"]);
               $subject = sqlesc("Welcome");
               SQL_Query_exec("INSERT INTO messages (sender, receiver, subject, added, msg, poster) VALUES(0, $id, $subject, $dt, $msg, 0)");
           }

           die;
       }
   }
}
?>

<!DOCTYPE html>
<html lang="en">

<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title><?php echo $site_config['SITENAME']; ?></title>
   <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
   <link rel="stylesheet" type="text/css" href="css/fontawesome-all.min.css">
   <link rel="stylesheet" type="text/css" href="css/iofrm-style.css">
   <link rel="stylesheet" type="text/css" href="css/iofrm-theme14.css">

   <style>
       body {
           min-height: 100vh;
           background-image: url('images/reaper.jpg');
           background-size: cover;
           background-position: center;
           background-repeat: no-repeat;
           background-attachment: fixed;
       }

       .form-body {
           background: rgba(0, 0, 0, 0.7);
           min-height: 100vh;
           display: flex;
           align-items: center;
           justify-content: center;
       }

       .form-content {
           background: rgba(20, 20, 20, 0.9);
           border-radius: 10px;
           padding: 20px;
           box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
       }

       .form-items {
           color: #ccc;
       }

       .form-items h3,
       .form-items a {
           color: #e0e0e0;
       }

       .password-container {
           position: relative;
           width: 100%;
       }

       .form-control {
           width: 100%;
           padding-right: 40px;
           background: #333;
           border: 1px solid #555;
           color: #fff;
       }

       .password-toggle-icon {
           position: absolute;
           right: 10px;
           top: 50%;
           transform: translateY(-50%);
           cursor: pointer;
           color: #666;
           font-size: 18px;
       }

       .password-toggle-icon:hover {
           color: #0ff;
       }

       .btn-discord {
           background: #5865F2;
           color: white;
           border: none;
           border-radius: 8px;
           padding: 10px 20px;
           font-size: 16px;
           font-weight: bold;
           transition: 0.3s;
       }

       .btn-discord:hover {
           background: #4752C4;
       }

       .ibtn {
           background: #0a6c74;
           border: none;
       }

       .ibtn:hover {
           background: #0c8b96;
       }

       .project-honeypot {
           background: rgba(30, 30, 30, 0.8);
           padding: 12px;
           border-radius: 8px;
           border: 1px solid #0ff;
           max-width: 260px;
           margin: 0 auto;
       }

       .chacro {
           color: #ccc;
           font: bold 12px Arial;
           text-decoration: none;
       }

       .chacro:hover {
           color: #0ff;
           text-decoration: underline;
       }

       ::placeholder {
           color: #666;
       }
   </style>
</head>

<body>

   <div class="form-body container-fluid">
       <div class="row">
           <div class="form-holder">
               <div class="form-content">
                   <div class="form-items">
                       <h3>Can we be besties?</h3>
                       <p>You know the drill.</p>

                       <div class="page-links">
                           <a href="account-login.php">Login</a>
                           <a href="account-signup.php" class="active">Register</a>
                           <a href="account-recover.php">Recover Account</a>
                       </div>

                       <form method="post" action="account-signup.php?takesignup=1">

                           <?php if ($invite_row) { ?>
                               <input type="hidden" name="invite" value="<?php echo $_GET["invite"]; ?>">
                               <input type="hidden" name="secret" value="<?php echo htmlspecialchars($_GET["secret"]); ?>">
                           <?php } ?>

                           <!-- RECAPTCHA ADD -->
                           <input type="hidden" name="recaptcha_response" id="recaptcha_response">

                           <input class="form-control" type="text" name="wantusername" placeholder="Username" required>

                           <div class="password-container">
                               <input class="form-control" type="password" name="wantpassword" id="wantpassword" placeholder="Password" required>
                               <span class="password-toggle-icon" id="toggleWantPassword"><i class="fas fa-eye"></i></span>
                           </div>

                           <div class="password-container">
                               <input class="form-control" type="password" name="passagain" id="passagain" placeholder="Confirm Password" required>
                               <span class="password-toggle-icon" id="togglePassAgain"><i class="fas fa-eye"></i></span>
                           </div>

                           <input class="form-control" type="text" name="email" placeholder="E-mail Address" <?php echo $invite_row ? '' : 'required'; ?>>

                           <div class="form-button">
                               <button id="submit" type="submit" class="ibtn">Register</button>
                           </div>

                           <div class="discord-join">
                               <a href="https://discord.gg/r3B5mHEwfM" target="_blank" class="btn btn-discord">
                                   <i class="fab fa-discord"></i> Join Our Discord For Any Help
                               </a>
                           </div>

                           <div class="project-honeypot text-center mt-3">
                               <a href="http://www.projecthoneypot.org/" target="_blank" class="chacro d-block mb-1">MEMBER OF PROJECT HONEY POT</a>
                               <a href="http://www.unspam.com" target="_blank" class="chacro d-block">Spam Harvester Protection Network</a>
                           </div>

                       </form>
                   </div>
               </div>
           </div>
       </div>
   </div>

   <!-- Scripts -->
   <script src="js/jquery.min.js"></script>
   <!-- <script src="js/popper.min.js"></script> -->
   <script src="js/bootstrap.min.js"></script>
   <script src="js/main.js"></script>

   <script>
       document.getElementById("toggleWantPassword").addEventListener("click", function() {
           var input = document.getElementById("wantpassword");
           var icon = this.querySelector("i");
           input.type = input.type === "password" ? "text" : "password";
           icon.classList.toggle("fa-eye");
           icon.classList.toggle("fa-eye-slash");
       });

       document.getElementById("togglePassAgain").addEventListener("click", function() {
           var input = document.getElementById("passagain");
           var icon = this.querySelector("i");
           input.type = input.type === "password" ? "text" : "password";
           icon.classList.toggle("fa-eye");
           icon.classList.toggle("fa-eye-slash");
       });
   </script>


   <!-- RECAPTCHA v3 integration -->

   <script src="https://www.google.com/recaptcha/api.js?render=<?php echo $site_config["RECAPTCHA_SITE_KEY"]; ?>"></script>
   <script>
       grecaptcha.ready(function() {
           grecaptcha.execute('<?php echo $site_config["RECAPTCHA_SITE_KEY"]; ?>', {
               action: 'signup'
           }).then(function(token) {
               document.getElementById("recaptcha_response").value = token;
           });
       });
   </script>

</body>

</html>
I have had this for some time and been using it where needed and it seems to work. Not all calls can automatically switched to this, but I been having good luck on some inserts, posts, etc. Trying to make it easier to move to prepared statements without rewriting every line of code. I will just share it and you can decide to test also. This goes in backend/mysql.class.php
function SQL_Query_prepared(string $query, string $types = '', array $params = [])
{
   $db = $GLOBALS['DBconnector'] ?? null;

   if (!$db instanceof mysqli) {
       error_log("SQL_Query_prepared Error: Database connection is not available.");
       return false;
   }

   $stmt = null;

   try {

       $stmt = mysqli_prepare($db, $query);

       if (!$stmt) {
           throw new Exception("Prepare failed: " . mysqli_error($db));
       }

       if ($types !== '') {

           if (strlen($types) !== count($params)) {
               throw new Exception("Parameter count does not match type definition.");
           }

           $bindParams = [$types];

           foreach ($params as $key => $value) {
               $bindParams[] = &$params[$key];
           }

           if (!call_user_func_array([$stmt, 'bind_param'], $bindParams)) {
               throw new Exception("bind_param failed: " . mysqli_stmt_error($stmt));
           }
       }

       if (!mysqli_stmt_execute($stmt)) {
           throw new Exception("Execute failed: " . mysqli_stmt_error($stmt));
       }

       $result = mysqli_stmt_get_result($stmt);

       if ($result instanceof mysqli_result) {
           return $result;
       }

       return mysqli_stmt_affected_rows($stmt) >= 0;

   } catch (Throwable $e) {

       error_log(
           "SQL_Query_prepared Error: " .
           $e->getMessage() .
           " | Query: " . $query
       );

       return false;

   } finally {

       if ($stmt instanceof mysqli_stmt) {
           mysqli_stmt_close($stmt);
       }
   }
}
Who would delete your posts? That is unusual spirit. I know I would never remove any posts such as yours because you are always very helpful. I dont touch anything lol. Its good to see you are well friend
I gave botanicar (exyusubs) a base code and he was working on it and posted it up on github. It is a base of TTv3, not mbitsy.
Inactive Users — 2026-05-10 12:50:50 in v3 Mods Requests
https://pastebin.com/U8a3YsuK use this and delete the inactiveusers.php file, its not needed if you do what I posted here. I forgot that I added this to the admincp on my test site, so just toss that file.

admincp.php, add to the nav area
   <td align="center"><a href="admincp.php?action=inactiveusers"><img src="images/admin/inactiveusers.png" border="0" width="118" height="80" alt="" /><br /><?php echo T_("USURSINACTIVE"); ?><br /></a></td>


save image to images/admin
Inactive Users — 2026-05-05 20:24:32 in v3 Mods Requests
I noticed that the record_mail function does nothing in my tests.
Inactive Users — 2026-05-03 06:40:12 in v3 Mods Requests
seems like maybe your mail file is wrong or you cant send emails from your server. Its an email issue not the inactiveuser file I shared. Feel free to read this if it helps as far as sending emails https://github.com/MicrosoulV3/TorrentTrader-v3
Inactive Users — 2026-04-30 21:08:10 in v3 Mods Requests
try this.
new file mybonus — 2026-03-30 22:24:56 in v3 Mods Completed
looks great. thanks for sharing
Like many other users, I always used "disk" as the cache method in the config. I wanted to try memcache just for testing. It seems as it turns out, there is a seemingly better version of that called "memcached", so I installed it on my test server, and switched my config to this.
// Caching Configuration
$site_config["cache_type"] = "memcached";             // Cache type (disk or memcached. Must install memcached on your server to use)
$site_config["cache_memcached_host"] = "localhost";            // Memcache host
$site_config["cache_memcached_port"] = 11211;                  // Memcache port
$site_config['cache_dir'] = getcwd().'/cache/diskcache';      // Disk cache directory (chmod 777)


and removed the other options that are long dead and no longer anything. There are only 2 reasonable options, disk or memcached, so here is an updated cache.php file
<?php
$GLOBALS["TTCache"] = new TTCache;

class TTCache {

   private $cachedir;
   private $type;
   private $obj;

   function __construct() {
       GLOBAL $site_config;

       $this->cachedir = rtrim($site_config["cache_dir"], '/') . '/';
       $this->type = strtolower(trim($site_config["cache_type"]));

       switch ($this->type) {

           case "memcached":

               // Check for extension
               if (!class_exists('Memcached')) {
                   error_log("Memcached extension not installed, falling back to disk.");
                   $this->type = "disk";
                   break;
               }

               $this->obj = new Memcached();

               $this->obj->addServer(
                   $site_config["cache_memcached_host"],
                   $site_config["cache_memcached_port"]
               );

               // Test connection
               $stats = $this->obj->getStats();
               if (empty($stats)) {
                   error_log("Memcached server not reachable, falling back to disk.");
                   $this->type = "disk";
               }

               break;

           default:
               $this->type = "disk";
       }
   }

   function Set($var, $val, $expire = 0) {
       GLOBAL $site_config;

       if ($expire == 0) return;

       $var = $site_config['SITENAME'] . "_" . $var;

       switch ($this->type) {

           case "memcached":
               return $this->obj->set($var, $val, $expire);

           case "disk":
               $cache_file = $this->cachedir . md5($var) . '.cache';

               if (file_put_contents($cache_file, serialize($val)) === false) {
                   throw new Exception("Failed to write cache file: " . $cache_file);
               }

               touch($cache_file, time() + $expire);
               return true;
       }
   }

   function Delete($var) {
       GLOBAL $site_config;

       $var = $site_config['SITENAME'] . "_" . $var;

       switch ($this->type) {

           case "memcached":
               return $this->obj->delete($var);

           case "disk":
               $cache_file = $this->cachedir . md5($var) . '.cache';

               if (file_exists($cache_file) && !unlink($cache_file)) {
                   throw new Exception("Failed to delete cache file: " . $cache_file);
               }

               return true;
       }
   }

   function Get($var, $expire = 0) {
       GLOBAL $site_config;

       if ($expire == 0) return false;

       $var = $site_config['SITENAME'] . "_" . $var;

       switch ($this->type) {

           case "memcached":
               $result = $this->obj->get($var);

               if ($this->obj->getResultCode() === Memcached::RES_NOTFOUND) {
                   return false;
               }

               return $result;

           case "disk":
               $cache_file = $this->cachedir . md5($var) . '.cache';

               if (file_exists($cache_file) && (time() - filemtime($cache_file)) < $expire) {
                   return unserialize(file_get_contents($cache_file));
               }

               return false;
       }
   }
}

// Cached MySQL Functions

function get_row_count_cached($table, $suffix = "") {
   GLOBAL $TTCache;

   $query = "SELECT COUNT(*) FROM $table $suffix";
   $cache = "get_row_count/" . sha1($query);

   if (($ret = $TTCache->Get($cache, 300)) === false) {
       $res = SQL_Query_exec($query);
       $row = mysqli_fetch_row($res);
       $ret = $row[0];
       $TTCache->Set($cache, $ret, 300);
   }

   return $ret;
}

function SQL_Query_exec_cached($query, $cache_time = 300, $cache_blank = 1) {
   GLOBAL $TTCache;

   $cache = "queries/" . sha1($query);

   if (($rows = $TTCache->Get($cache, $cache_time)) === false) {

       $res = SQL_Query_exec($query);
       $rows = array();

       while ($row = mysqli_fetch_assoc($res)) {
           $rows[] = $row;
       }

       if (count($rows) || $cache_blank) {
           $TTCache->Set($cache, $rows, $cache_time);
       }
   }

   return count($rows) ? $rows : false;
}

You can google how to adjust the amount of RAM to allow it to use. I own my server, so I have 32gb allocated, and am noticing alot of improvement over disk. You dont have to go that high with the RAM, but I have plenty of RAM and only noticed about 1.5gb used for this Just wanted to post my findings. Time will tell, but so far it seems much better
syntax error — 2026-02-27 20:20:03 in v3 Support
your tmdb table is getting the data for the last_action table. I dont know why, you have something clearly wrong with your query somewhere. Read the output, your last_action is empty, while the tmdb table has a date in it, which is clearly meant for the last_action table. You have a bad query somewhere along the line. Since everyone runs custom code anymore, thats as much help as I can offer. You'll find it. check your UPDATES and INSERTS
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