. */ // Enviroment Runtime ////////////////////////////////////////////////////////////////////////////// // error level error_reporting(E_ERROR | E_PARSE); //error_reporting(E_ALL & ~E_WARNING); //error_reporting(E_ALL | E_STRICT | E_DEPRECATED); // ignore disconnects ignore_user_abort(true); // load tracker core require './tracker.mysql.php'; // Verify Request ////////////////////////////////////////////////////////////////////////////////// // tracker statistics if (isset($_GET['stats'])) { // display stats peertracker::open(); peertracker::stats(); peertracker::close(); exit; } // 20-bytes - info_hash // sha-1 hash of torrent being tracked if (!isset($_GET['info_hash']) || strlen($_GET['info_hash']) != 20) { // full scrape disabled if (!$_SERVER['tracker']['full_scrape']) exit; // full scrape enabled else unset($_GET['info_hash']); } // Handle Request ////////////////////////////////////////////////////////////////////////////////// // strip info_hash & peer_id if (get_magic_quotes_gpc()) stripslashes($_GET['info_hash']); // scrape peertracker::open(); peertracker::scrape(); peertracker::close(); ?>