<?php define('ROOT', '../../'); header('Access-Control-Allow-Origin: *'); header('Content-type: application/json'); require_once ROOT . '../private_html/config.php'; require_once ROOT . '../private_html/includes/database.php'; require_once ROOT . '../private_html/includes/func.php'; cacheCurrentPage(array('api' => 1)); // Our json encoded response $response = array(); if (!isset($_GET['page'])) { $page = 1; } else { $page = intval($_GET['page']); } // get the total number of plugins $totalPlugins = countPlugins(PLUGIN_ORDER_POPULARITY); $response['maxPages'] = ceil($totalPlugins / PLUGIN_LIST_RESULTS_PER_PAGE); // offset is how many plugins to start after $offset = ($page - 1) * PLUGIN_LIST_RESULTS_PER_PAGE; foreach (loadPlugins(PLUGIN_ORDER_POPULARITY, PLUGIN_LIST_RESULTS_PER_PAGE, $offset) as $plugin) { if ($plugin->isHidden()) { continue; } // count the number of servers in the last 24 hours $servers24 = $plugin->getServerCount(); // add the plugin $response['plugins'][] = array('rank' => $plugin->getRank(), 'lastrank' => $plugin->getLastRank(), 'name' => htmlentities($plugin->getName()), 'authors' => htmlentities($plugin->getAuthors()), 'servers24' => number_format($servers24)); } $response['status'] = 'ok';
<?php define('ROOT', './'); session_start(); require_once ROOT . '../private_html/config.php'; require_once ROOT . '../private_html/includes/database.php'; require_once ROOT . '../private_html/includes/func.php'; cacheCurrentPage(); /// Templating $page_title = 'MCStats :: Donate to MCStats'; $breadcrumbs = '<a href="/donate/" class="current">Donate</a>'; send_header(); echo ' <div class="row-fluid"> <div class="widget-box span8 offset2"> <div class="widget-title"><span><i></i></span><h4 style="float: left; margin-left: 35%;">Serving you rock solid stats.</h4></div> <div class="widget-content"> <p style="font-size: 16px;"> MCStats serves over <span style="font-weight:bold; font-size: 20px;">550 requests per second</span> 24 hours a day, 7 days a week </p> <p style="font-size: 16px;"> That is over <b><span style="font-size: 20px;">1.5 billion</span> requests per month</b> and over <b><span style="font-size: 20px;">50 million</span> requests each day</b> and it will only continue to rise. </p> <p> Every single server is tracked. To get useful data for plugins, every server needs to be identified and from there data is stored such as the plugins the server is using (that support MCStats), the amount of players online, and even the Minecraft version the server is on. </p> <p> This is no simple task. It requires a lot of power and it also needs room for growth. Right now the service