* Fixes an issue where any api_key would be validated * Now returns user ID upon success, aborts script processing with error on fail
16 lines
324 B
PHP
16 lines
324 B
PHP
<?php
|
|
|
|
// Make sure we are called from index.php
|
|
if (!defined('SECURITY'))
|
|
die('Hacking attempt');
|
|
|
|
// Check user token
|
|
$id = $user->checkApiKey($_REQUEST['api_key']);
|
|
|
|
// Output JSON format
|
|
echo json_encode(array('getpoolhashrate' => $statistics->getCurrentHashrate()));
|
|
|
|
// Supress master template
|
|
$supress_master = 1;
|
|
?>
|