preg_match_all('/\b(https?):\/\/(www).(imdb.com)[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i', $bang2, $matches); //Get any IMDB link from descr and load it into the DB under imdb
$timdb = SQL_Query_exec("SELECT descr FROM torrents WHERE id = $id");
$bang = mysqli_fetch_assoc($timdb);
$bang2 = implode(" ",$bang);
preg_match_all('/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i', $bang2, $matches);
$urls = $matches[0];
function array_map_callback($url)
{
return mysqli_real_escape_string($GLOBALS["DBconnector"], $url);
}
array_map('array_map_callback', $urls);
foreach ($urls as $url) {
SQL_Query_exec("UPDATE `torrents` SET `imdb`= '".$url."' WHERE id = $id");
} CREATE TABLE `iplog` (
`id` int(10) UNSIGNED NOT NULL,
`ip` varchar(15) NOT NULL DEFAULT '',
`userid` int(10) UNSIGNED NOT NULL DEFAULT 0,
`added` datetime DEFAULT NULL,
`lastused` datetime DEFAULT NULL,
`timesused` int(10) NOT NULL DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;function err($msg) {
// Sanitize user input to prevent SQL injection attacks
$safe_msg = mysqli_real_escape_string($GLOBALS["DBconnector"], $msg);
// Execute the query and check for errors
$result = mysqli_query($GLOBALS["DBconnector"], "INSERT INTO announce_log (message, added) VALUES ('$safe_msg', NOW())");
if (!$result) {
return benc_resp_raw("d".benc_str("failure reason").benc_str("Error executing query: " . mysqli_error($GLOBALS["DBconnector"]))."e");
}
// Return success response if the insert was successful
return benc_resp_raw("d".benc_str("success").benc_str("")."e");
} authkeyauthKey<?php
class Captcha
{
const RECAPTCHA_API_URL = 'https://www.google.com/recaptcha/api/siteverify';
private $key;
private $secret;
public function __construct($site_config)
{
$this->key = $site_config['CAPTCHA_KEY'];
$this->secret = $site_config['CAPTCHA_SECRET'];
}
public function response($captcha)
{
if ($site_config['CAPTCHA_ON']) {
if (!$captcha) {
autolink(T_('<b>Please check the the captcha form.</b>'), "account-login.php");
}
$verifyResponse = file_get_contents(self::RECAPTCHA_API_URL . '?secret=' . $this->secret . '&response=' . $captcha);
if ($verifyResponse === false) {
// handle error
return false;
}
$responseData = json_decode($verifyResponse);
if ($responseData === null) {
// handle error
return false;
}
if ($responseData->success) {
// it's successful, so let it go
return true;
} else {
autolink(T_('<b>Please check the the captcha form.</b>'), "account-login.php");
return false;
}
}
// CAPTCHA not enabled, so return true
return true;
}
public function html()
{
if ($site_config['CAPTCHA_ON']) {
return print("<div class='g-recaptcha' data-theme='light' data-sitekey='" . $this->key . "'></div>");
}
}
} SQL_Query_exec("UPDATE `torrents` SET `freeleech` = '1' WHERE `id` = '$row[id]'");begin_frame(T_("UPLOAD"));
?>
<form name="upload" enctype="multipart/form-data" action="torrents-upload.php" method="post">
<input type="hidden" name="takeupload" value="yes" />
<table border="0" cellspacing="0" cellpadding="6" align="center">
<?php
print ("<tr><td align='right' valign='top'>" . T_("ANNOUNCE_URL") . ": </td><td align='left'>");
//while (list($key,$value) = thisEach($announce_urls)) {
foreach($announce_urls as $key => $value) {
echo "<b>$value</b><br />";
}begin_frame(T_("UPLOAD"));
?>
<table border="0" cellspacing="0" cellpadding="6" align="center">
<?php
echo "<br />";
print ("<tr><td align='right' valign='top'>" . T_("ANNOUNCE_URL") . ": </td><td align='left'>");
foreach($announce_urls as $key => $value) {
echo ("<input type='text' id='myInput' size='30' value='" . $value . "' />");
}
?>
<!-- The button and styling used to copy the announce -->
<style>
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 140px;
background-color: #555;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
bottom: 150%;
left: 50%;
margin-left: -75px;
opacity: 0;
transition: opacity 0.3s;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #555 transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
</style>
<div class="tooltip">
<button onclick="myFunction()" onmouseout="outFunc()">
<span class="tooltiptext" id="myTooltip">Copy to clipboard</span>
Copy Announce
</button>
</div>
<script>
function myFunction() {
var copyText = document.getElementById("myInput");
copyText.select();
document.execCommand("Copy");
var tooltip = document.getElementById("myTooltip");
tooltip.innerHTML = "Copied!";
}
function outFunc() {
var tooltip = document.getElementById("myTooltip");
tooltip.innerHTML = "Copy to clipboard";
}
</script>
<!--END copy button and styling-->
<form name="upload" enctype="multipart/form-data" action="torrents-upload.php" method="post">
<input type="hidden" name="takeupload" value="yes" />
<?php$site_config['ALLOWEXTERNAL'] = true; //Enable Uploading of external tracked torrentssession_start();