function err($msg)
{
    benc_resp(array("failure reason" => array(type => "string", value => $msg)));
    exit;
}
Example #2
0
function err($msg)
{
    benc_resp(array('failure reason' => array('type' => 'string', 'value' => $msg)));
    exit;
}
Example #3
0
            $db->port = $data['port'];
            $db->uploaded = 0;
            $db->downloaded = 0;
            $db->to_go = $data['left'];
            $db->seeder = $data['seeder'];
            $db->started = time();
            $db->last_action = time();
            $db->passkey = $data['passkey'];
            $db->connectable = $data['connectable'];
            $db->insert();
            if ($data['seeder']) {
                $torrent_query[] = "torrent_seeders = torrent_seeders + 1";
            } else {
                $torrent_query[] = "torrent_leechers = torrent_leechers + 1";
            }
        }
    }
    if ($data['seeder']) {
        $torrent_query[] = "torrent_visible = '1'";
        $torrent_query[] = "torrent_last_action = '" . time() . "'";
    }
    $db = new DB();
    if (count($torrent_query)) {
        $db->query("UPDATE {PREFIX}torrents SET " . implode(", ", $torrent_query) . " WHERE torrent_id = '{$torrent_id}'");
    }
    $callback[] = benc_str("private") . 'i1e';
    benc_resp_raw(implode("", $callback));
} catch (Exception $e) {
    benc_resp(array('failure reason' => array('type' => 'string', 'value' => $e->getMessage())));
    exit;
}
function err($msg, $userid = 0, $torrentid = 0)
{
    benc_resp(array('failure reason' => array('type' => 'string', 'value' => $msg)));
    exit;
}
Example #5
0
function err($msg) {
	benc_resp(array("failure reason" => array('type' => "string", 'value' => $msg)));
	die();
}