My announce

Started by Shadow, August 06, 2013, 07:46:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Shadow


autotron

Quote from: keyboar on August 06, 2013, 08:10:05 PM
Quote from: elephant on August 06, 2013, 08:03:41 PM
Download speeds?

yes

download speeds have NOTHING to do with announce, speeds are determined by peer to peer all the tracker/site is doing is keeping track of upload and download.

Shadow


elephant


Shadow

<?

//$double = true;
//$free = true;

ob_start("ob_gzhandler");

require_once("include/bittorrent.php");
require_once("include/benc.php");



function err($msg)
{
        benc_resp(array("failure reason" => array(type => "string", value => $msg)));
        exit();
}

function benc_resp($d)
{
        benc_resp_raw(benc(array(type => "dictionary", value => $d)));
}

function benc_resp_raw($x)
{
        header("Content-Type: text/plain");
        header("Pragma: no-cache");
        print($x);
}

foreach (array("passkey","info_hash","peer_id","ip","event") as $x)

$GLOBALS[$x] = "" . $_GET[$x];





foreach (array("port","downloaded","uploaded","left") as $x)

$GLOBALS[$x] = 0 + $_GET[$x];



if (strpos($passkey, "?")) {

  $tmp = substr($passkey, strpos($passkey, "?"));

$passkey = substr($passkey, 0, strpos($passkey, "?"));

$tmpname = substr($tmp, 1, strpos($tmp, "=")-1);

$tmpvalue = substr($tmp, strpos($tmp, "=")+1);

$GLOBALS[$tmpname] = $tmpvalue;

}



foreach (array("passkey","info_hash","peer_id","port","downloaded","uploaded","left") as $x)

if (!isset($x)) err("Missing key: $x");



foreach (array("info_hash","peer_id") as $x)

if (strlen($GLOBALS[$x]) != 20) err("Invalid $x (" . strlen($GLOBALS[$x]) . " - " . urlencode($GLOBALS[$x]) . ")");



if (strlen($passkey) != 32) err("Invalid passkey (" . strlen($passkey) . " - $passkey)");



//if (empty($ip) || !preg_match('/^(d{1,3}.){3}d{1,3}$/s', $ip))

$ip = getip();

$rsize = 50;
foreach(array("num want", "numwant", "num_want") as $k)
{
        if (isset($_GET[$k]))
        {
                $rsize = 0 + $_GET[$k];
                break;
        }
}

$agent = $_SERVER["HTTP_USER_AGENT"];

// Deny access made with a browser...
if (ereg("^Mozilla\\/", $agent) || ereg("^Opera\\/", $agent) || ereg("^Links ", $agent) || ereg("^Lynx\\/", $agent))
        err("torrent not registered with this tracker");

if (!$port || $port > 0xffff)
        err("invalid port");

if (!isset($event))
        $event = "";

$seeder = ($left == 0) ? "yes" : "no";

dbconn(false);

$valid = @mysql_fetch_row(@mysql_query("SELECT COUNT(*) FROM users WHERE passkey=" . sqlesc($passkey)));

if ($valid[0] != 1) err("Invalid passkey! Re-download the .torrent from $BASEURL");


$res = mysql_query("SELECT id, banned, half, free, seeders + leechers AS numpeers, UNIX_TIMESTAMP(added) AS ts FROM torrents WHERE " . hash_where("info_hash", $info_hash));
$torrent = mysql_fetch_assoc($res);
if (!$torrent)
        err("torrent not registered with this tracker");

$torrentid = $torrent["id"];

$fields = "seeder, peer_id, ip, port, uploaded, downloaded, userid";

$numpeers = $torrent["numpeers"];
$limit = "";
if ($numpeers > $rsize)
        $limit = "ORDER BY RAND() LIMIT $rsize";
$res = mysql_query("SELECT $fields FROM peers WHERE torrent = $torrentid AND connectable = 'yes' $limit");

$resp = "d" . benc_str("interval") . "i" . $announce_interval . "e" . benc_str("peers") . "l";
unset($self);
while ($row = mysql_fetch_assoc($res))
{
        $row["peer_id"] = hash_pad($row["peer_id"]);

        if ($row["peer_id"] === $peer_id)
        {
                $userid = $row["userid"];
                $self = $row;
                continue;
        }

        $resp .= "d" .
                benc_str("ip") . benc_str($row["ip"]) .
                benc_str("peer id") . benc_str($row["peer_id"]) .
                benc_str("port") . "i" . $row["port"] . "e" .
                "e";
}

$resp .= "ee";

$selfwhere = "torrent = $torrentid AND " . hash_where("peer_id", $peer_id);

if (!isset($self))
{
        $res = mysql_query("SELECT $fields FROM peers WHERE $selfwhere");
        $row = mysql_fetch_assoc($res);
        if ($row)
        {
                $userid = $row["userid"];
                $self = $row;
        }
}

//// Up/down stats ////////////////////////////////////////////////////////////



if (!isset($self))

{

$valid = @mysql_fetch_row(@mysql_query("SELECT COUNT(*) FROM peers WHERE torrent=$torrentid AND passkey=" . sqlesc($passkey)));

if ($valid[0] >= 1 && $seeder == 'no') err("Connection limit exceeded! You may only leech from one location at a time.");

if ($valid[0] >= 3 && $seeder == 'yes') err("Connection limit exceeded!");



$rz = mysql_query("SELECT id, uploaded, downloaded, class FROM users WHERE passkey=".sqlesc($passkey)." AND enabled = 'yes' ORDER BY last_access DESC LIMIT 1") or err("Tracker error 2");

if ($MEMBERSONLY && mysql_num_rows($rz) == 0)

err("Unknown passkey. Please redownload the torrent from $BASEURL.");
        $az = mysql_fetch_assoc($rz);
        $userid = $az["id"];

//        if ($left > 0 && $az["class"] < UC_VIP)
        if ($az["class"] < UC_VIP)
        {
                $gigs = $az["uploaded"] / (1024*1024*1024);
                $elapsed = floor((gmtime() - $torrent["ts"]) / 3600);
                $ratio = (($az["downloaded"] > 0) ? ($az["uploaded"] / $az["downloaded"]) : 1);
                if ($ratio < 0.5 || $gigs < 5) $wait = 0;
                elseif ($ratio < 0.65 || $gigs < 6.5) $wait = 0;
                elseif ($ratio < 0.8 || $gigs < 8) $wait = 0;
                elseif ($ratio < 0.95 || $gigs < 9.5) $wait = 0;
                else $wait = 0;
                if ($elapsed < $wait)
                                err("Not authorized (" . ($wait - $elapsed) . "h) - READ THE FAQ!");
        }
}
else
{
        $upthis = max(0, $uploaded - $self["uploaded"]);

if(file_exists("cache/multiplier.txt"))
{
   $Info = unserialize(@file_get_contents("cache/multiplier.txt"));
   $GlobalMultiplier = $Info["GlobalMultiplier"];
   $GlobalMultiplierEnabled = $Info["GlobalMultiplier"];
}
else
{
   $GlobalMultiplier = 1;
   $GlobalMultiplierEnabled = "no"; 
}
if($GlobalMultiplierEnabled == "yes" && $GlobalMultiplier > 1)
   $upthis = $upthis * $GlobalMultiplier;
else
   $upthis = $upthis;
        $downthis = max(0, $downloaded - $self["downloaded"]);
    //if ($free)
        //$downthis = 0;
    //if ($double)
        //$upthis *= 2;
if ($torrent['half']=='yes')
  $downthis = $downthis / 2;
 
if ($upthis > 0 || $downthis > 0)
mysql_query("UPDATE users SET uploaded = uploaded + $upthis". ($torrent['free']=='no'?", downloaded = downloaded + $downthis ":' '). "WHERE id=$userid") or err("Tracker error 3");
}

///////////////////////////////////////////////////////////////////////////////

$dt = gmtime() - 180;
$dt = sqlesc(get_date_time($dt));

function portblacklisted($port)
{
        // direct connect
        if ($port >= 411 && $port <= 413) return true;

        // bittorrent
        if ($port >= 6881 && $port <= 6889) return true;

        // kazaa
        if ($port == 1214) return true;

        // gnutella
        if ($port >= 6346 && $port <= 6347) return true;

        // emule
        if ($port == 4662) return true;

        // winmx
        if ($port == 6699) return true;

        return false;
}

$updateset = array();

if ($event == "stopped")
{
        if (isset($self))
        {
                mysql_query("DELETE FROM peers WHERE $selfwhere");
                if (mysql_affected_rows())
                {
                        if ($self["seeder"] == "yes")
                                $updateset[] = "seeders = seeders - 1";
                        else
                                $updateset[] = "leechers = leechers - 1";
                }
        }
}
else
{
       if ($event == "completed")
{
$updateset[] = "times_completed = times_completed + 1";
mysql_query("UPDATE snatched SET  finished  = 'yes', complete_date = $dt WHERE torrentid = $torrentid AND userid = $userid");
mysql_query("UPDATE torrent_hit SET  completed  = 'yes' WHERE id = $torrentid AND uid = $userid");
}
        if (isset($self))
        {
                $res_s = mysql_query("SELECT uploaded, downloaded FROM snatched WHERE torrentid = $torrentid AND userid = $userid");
                $row_s = mysql_fetch_array($res_s);
                $downloaded2 = max(0, $downloaded - $self["downloaded"]);
                $uploaded2 = max(0, $uploaded - $self["uploaded"]);
                mysql_query("UPDATE snatched SET uploaded = uploaded + $uploaded2, port = $port, agent= " . sqlesc($agent) . ", last_action = $dt WHERE torrentid = $torrentid AND userid = $userid");
                mysql_query("UPDATE snatched SET downloaded = downloaded + $downloaded2 WHERE torrentid = $torrentid AND userid = $userid");
                mysql_query("UPDATE peers SET uploaded = $uploaded, downloaded = $downloaded, to_go = $left, last_action = NOW(), seeder = '$seeder'"
                        . ($seeder == "yes" && $self["seeder"] != $seeder ? ", finishedat = " . time() : "") . " WHERE $selfwhere");
                if (mysql_affected_rows() && $self["seeder"] != $seeder)
                {
                        if ($seeder == "yes")
                        {
                                $updateset[] = "seeders = seeders + 1";
                                $updateset[] = "leechers = leechers - 1";
                        }
                        else
                        {
                                $updateset[] = "seeders = seeders - 1";
                                $updateset[] = "leechers = leechers + 1";
                        }
                }
        }
        else
        {
                if (portblacklisted($port))
                        err("Port $port is blacklisted.");
                else
        if(ereg("^BitTorrent\\/S-", $agent)) err("Shadow's Experimental Client is Banned.");
        if(ereg("^ABC\\/ABC", $agent)) err ("ABC is Banned.");
        if(ereg("^Python-urllib\\/2.4", $agent)) err ("Banned Client.");
        if(ereg("^0P3R4H", $httpagent)) err ("IBrowser Opera is not a cool BT client.");
        if(substr($peer_id, 0, 7) == "-AZ2500") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-AZ2501") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-AZ2502") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-AZ3040") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-UT1600") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-UT160B") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-UT161B") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-UT170B") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-UT1700") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-UT1710") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-UT1720") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-UT1730") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-UT1740") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-UT1750") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-TR101Z") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-DE0580") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-DE0581") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-KT2030") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-KT2140") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-KT2210") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-BC0071") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-BC0075") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 7) == "-BC0077") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 6) == "-AZ300") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 6) == "-AZ301") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 6) == "-AZ302") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 6) == "-AZ303") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 6) == "-DE054") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 6) == "-DE057") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 6) == "-BC005") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 6) == "-BC006") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 6) == "-BC008") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 6) == "-BC009") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "-TR09") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "-TR08") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "-BC01") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "-AZ20") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "-AZ22") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "-AZ23") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "-AZ24") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "-UT11") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "-UT12") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "-UT13") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "-UT14") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "-UT15") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "turbo") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 5) == "Mbrst") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 4) == "FUTB") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 4) == "exbc") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 4) == "T037") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 4) == "T03F") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 4) == "\0\2BS") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 4) == "\0\3BS") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "XBT") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "M5-") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "M3-") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-G3") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "M6-") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-LT") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-lt") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-FG") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-CD") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-TS") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-BB") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-SZ") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-LW") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-AG") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-NE") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-VT") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-DL") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-MT") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-BR") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-LP") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-HL") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 3) == "-BT") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 2) == "R2") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 2) == "A3") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 2) == "BS") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(substr($peer_id, 0, 1) == "O") err ("Out of date or BANNED client version. You need to change your client with one in the ACCEPTED list.");
        if(preg_match("/^RAZA (.+)$/", $httpagent, $matches)) err ("Shareaza is Banned.");
        if(preg_match("/MLDonkey\/([0-9]+).([0-9]+).([0-9]+)*/", $httpagent, $matches)) err ("MLDonkey is not a BT client.");
        if(preg_match("/ed2k_plugin v([0-9]+\\.[0-9]+).*/", $httpagent, $matches)) err ("eDonkey is not a BT client.");
        if(preg_match("/^Python-urllib\\/([0-9]+\\.[0-9]+(\\.[0-9]+)*)/", $httpagent, $matches)) err ("G3 is Banned.");
        if(preg_match("/Rufus\/([0-9]+\.[0-9]+\.[0-9]+)/", $httpagent, $matches)) err ("Rufus is Banned.");
        if(preg_match("/CT([0-9]+)([0-9]+)([0-9]+)([0-9]+)/", $peer_id, $matches)) err ("cTorrent is Banned.");
                {
                        $sockres = @fsockopen($ip, $port, $errno, $errstr, 5);
                        if (!$sockres)
                                $connectable = "no";
                        else
                        {
                                $connectable = "yes";
                                @fclose($sockres);
                        }
                }

                $res1_s = mysql_query("SELECT torrentid, userid FROM snatched WHERE torrentid = $torrentid AND userid = $userid") or err('Tracker error (120)');
                $row1_s = mysql_fetch_assoc($res1_s);
                if (!$row1_s)
                mysql_query("INSERT INTO snatched (torrentid, userid, port, start_date, agent,ip,peer_id) VALUES ($torrentid, $userid, $port, $dt, " . sqlesc($agent) . "," . sqlesc($ip) . "," . sqlesc($peer_id) . ")");
                $ret = mysql_query("INSERT INTO peers (connectable, torrent, peer_id, ip, port, uploaded, downloaded, to_go, started, last_action, seeder, userid, agent, uploadoffset, downloadoffset) VALUES ('$connectable', $torrentid, " . sqlesc($peer_id) . ", " . sqlesc($ip) . ", $port, $uploaded, $downloaded, $left, NOW(), NOW(), '$seeder', $userid, " . sqlesc($agent) . ", $uploaded, $downloaded)");
                if ($ret)
                {
                        if ($seeder == "yes")
                                $updateset[] = "seeders = seeders + 1";
                        else
                                $updateset[] = "leechers = leechers + 1";
                }
        }
}

if ($seeder == "yes")
{
        if ($torrent["banned"] != "yes")
                $updateset[] = "visible = 'yes'";
        $updateset[] = "last_action = NOW()";
}

if (count($updateset))
        mysql_query("UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $torrentid");

benc_resp_raw($resp);


?>


My announce is normal? is that the speeds are quite weak