1 Star 3 Fork 2

mojie126 / HDCN-PT

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
scrape.php 912 Bytes
一键复制 编辑 Web IDE 原始数据 按行查看 历史
<?php
require_once('include/bittorrent_announce.php');
require_once('include/benc.php');
dbconn_announce();
block_browser();
preg_match_all('/info_hash=([^&]*)/i', $_SERVER["QUERY_STRING"], $info_hash_array);
$fields = "info_hash, times_completed, seeders, leechers";
if (count($info_hash_array[1]) < 1) {
$query = "SELECT $fields FROM torrents ORDER BY id";
} else {
$query = "SELECT $fields FROM torrents WHERE " . hash_where_arr('info_hash', $info_hash_array[1]);
}
$r = "d" . benc_str("files") . "d";
$res = sql_query($query);
if (mysql_num_rows($res) < 1) {
err("种子未注册");
}
while ($row = mysql_fetch_assoc($res)) {
$r .= "20:" . hash_pad($row["info_hash"]) . "d" .
benc_str("complete") . "i" . $row["seeders"] . "e" .
benc_str("downloaded") . "i" . $row["times_completed"] . "e" .
benc_str("incomplete") . "i" . $row["leechers"] . "e" .
"e";
}
$r .= "ee";
benc_resp_raw($r);
PHP
1
https://gitee.com/mojie126/HDCN-PT.git
git@gitee.com:mojie126/HDCN-PT.git
mojie126
HDCN-PT
HDCN-PT
master

搜索帮助

14c37bed 8189591 565d56ea 8189591