我们正在做一个网站,您可以在其中编辑 torrent 文件的跟踪器。
我们目前正在搜索的SEEDS
和。PEERS
TRACKER
我们很困惑它是如何工作的。有没有人知道如何在 中显示SEEDS
和PEERS
的 torrent 文件PHP
?
就像在 中一样TORRENTEDITOR.COM
,我们已经看到了这样的代码,但我们不明白它是如何工作的,请帮助我们。
// global $seedsandpeers;
if ($seedsandpeers === TRUE){
if (!empty($array["announce-list"])){
$announce = $array["announce-list"];
// Possibly HtTp://
$announce = strtolower($announce);
if (substr($announce, 0, 7) === "http://"){
if ((substr_count($announce, "/announce")) == 1){
$scrape = str_replace('/announce', '/scrape', $announce);
$httpget = "?info_hash=";
$binsha1 = pack("H*", $infohash);
$binsha1s = addslashes($binsha1);
$fullurl = "$scrape$httpget$binsha1";
$httpurl = pathurlencode($fullurl);
sapeerconnect($httpurl, $binsha1s, $torrentsize);
} else {
$error = '<BR><label style="font-family:timesnewroman;font-size:12px;">Bad Tracker enter code hereURL for scraping (Maybe trackerless torrent).<br>' ;
echo $error;
}
}
else {
$error = '<BR><label style="font-family:timesnewroman;font-size:12px;">Bad Tracker URL for scraping (Maybe trackerless torrent).<br>';
echo $error;
}
}
}