From 5fd9fa480f302902328b81f912dd67ce378284f8 Mon Sep 17 00:00:00 2001 From: citizenz7 Date: Thu, 20 Apr 2017 18:50:55 +0200 Subject: V.1.4.6 --- Html/peers.php | 270 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 270 insertions(+) create mode 100644 Html/peers.php (limited to 'Html/peers.php') diff --git a/Html/peers.php b/Html/peers.php new file mode 100644 index 0000000..9593551 --- /dev/null +++ b/Html/peers.php @@ -0,0 +1,270 @@ + + + + +
+ + + +
+
+ + + +
+ + prepare('SELECT postTitle FROM blog_posts_seo WHERE postHash = :hash'); + $stmt->bindValue(':hash', $hash, PDO::PARAM_INT); + $stmt->execute(); + $row = $stmt->fetch(); + ?> + +

Torrent :

+ + + + + + + + + + + + + + prepare(' + SELECT xal.id,xal.ipa,xal.port,xal.peer_id,xal.downloaded down,xal.uploaded up,xal.uid,xfu.mtime time,b.username, IF(xal.left0=0,"seeder","leecher") as status + FROM xbt_announce_log xal + LEFT JOIN blog_members b ON b.memberID = xal.uid + LEFT JOIN xbt_files xf ON xf.info_hash = xal.info_hash + LEFT JOIN blog_posts_seo bps ON bps.postID = xf.fid + LEFT JOIN xbt_files_users xfu ON xfu.fid = xf.fid + WHERE bps.postHash = :postHash AND xfu.active = 1 AND xal.mtime < (UNIX_TIMESTAMP() - 30) + GROUP BY xal.ipa + ORDER BY status DESC + '); + $stmt->bindValue(':postHash', $hash, PDO::PARAM_INT); + $stmt->execute(); + + while($row = $stmt->fetch()) { + + // on trouve le client bittorrent + $peer = substr($row['peer_id'], 1, 2); + + if($peer == 'AZ') { + $client = 'Azureus'; + } + if($peer == 'AX') { + $client = 'AnalogX'; + } + elseif($peer == 'AG') { + $client = 'Ares'; + } + if($peer == 'BB') { + $client = 'BitBuddy'; + } + elseif($peer == 'BC') { + $client = 'BitComet'; + } + elseif($peer == 'BP') { + $client = 'Bittorrent Pro'; + } + elseif($peer == 'BT') { + $client = 'BBtor'; + } + elseif($peer == 'DE') { + $client = 'Deluge Torrent'; + } + elseif($peer == 'FX') { + $client = 'Freebox BitTorrent'; + } + elseif($peer == 'HL') { + $client = 'Halite'; + } + elseif($peer == 'HM') { + $client = 'hMule'; + } + elseif($peer == 'IL') { + $client = 'iLivid'; + } + elseif($peer == 'JT') { + $client = 'JavaTorrent'; + } + elseif($peer == 'KT') { + $client = 'KTorrent'; + } + elseif($peer == 'KG') { + $client = 'KGet'; + } + elseif($peer == 'LT') { + $client = 'libTorrent'; + } + elseif($peer == 'lt') { + $client = 'rTorrent'; + } + elseif($peer == 'LP') { + $client = 'Lphant'; + } + elseif($peer == 'LW') { + $client = 'LimeWire'; + } + elseif($peer == 'MO') { + $client = 'MonoTorrent'; + } + elseif($peer == 'MT') { + $client = 'MoonlightTorrent'; + } + elseif($peer == 'NB') { + $client = 'Net::Bittorent'; + } + elseif($peer == 'NX') { + $client = 'Net Transport'; + } + elseif($peer == 'OS') { + $client = 'OneSwarm'; + } + elseif($peer == 'OT') { + $client = 'Omega Torrent'; + } + elseif($peer == 'PB') { + $client = 'Protocol::BitTorrent'; + } + elseif($peer == 'PT') { + $client = 'PHPTracker'; + } + elseif($peer == 'qB') { + $client = 'qBittorrent'; + } + elseif($peer == 'SP') { + $client = 'BitSpirit'; + } + elseif($peer == 'st') { + $client = 'Sharktorrent'; + } + elseif($peer == 'SZ') { + $client = 'Shareaza'; + } + elseif($peer == 'TB') { + $client = 'Torch'; + } + elseif($peer == 'TIX') { + $client = 'Tixati'; + } + elseif($peer == 'TL') { + $client = 'Tribler'; + } + elseif($peer == 'TR') { + $client = 'Transmission'; + } + elseif($peer == 'TS') { + $client = 'Torrentstorm'; + } + elseif($peer == 'UM') { + $client = 'µTorrent for MAC'; + } + elseif($peer == 'UT') { + $client = 'µTorrent'; + } + elseif($peer == 'WD') { + $client = 'WebTorrent Desktop'; + } + elseif($peer == 'WT') { + $client = 'BitLet'; + } + elseif($peer == 'WW') { + $client = 'WebTorrent'; + } + elseif($peer == 'WY') { + $client = 'FireTorrent'; + } + elseif($peer == 'XT') { + $client = 'XanTorrent'; + } + elseif($peer == 'XX') { + $client = 'Xtorrent'; + } + elseif($peer == 'ZT') { + $client = 'ZipTorrent'; + } + + else { + $client = 'Client inconnu'; + } + + echo ''; + echo ''; + + if ($row['status'] == 'leecher') { + echo ''; + } + elseif ($row['status'] == 'seeder') { + echo ''; + } + + echo ''; + echo ''; + echo ''; + echo ''; + + //Peer Ratio + if (intval($row["down"])>0) { + $ratio=number_format($row["up"]/$row["down"],2); + } + else { + $ratio='∞'; + } + echo ''; + echo ''; + echo ''; + } + ?> + +
PseudoStatutClientPortTéléchargéUploadéRatioMis à jour
'.html($row['username']).'leecherseeder'.$client.''.$row['port'].''.makesize($row['down']).''.makesize($row['up']).''.$ratio.''.get_elapsed_time($row['time']).'
+ +
+ + + +
+
+
+ + + + + + + -- cgit v1.2.1