27 lines
719 B
PHP
27 lines
719 B
PHP
<?php
|
|
|
|
// Make sure we are called from index.php
|
|
if (!defined('SECURITY')) die('Hacking attempt');
|
|
|
|
// Check if the API is activated
|
|
$api->isActive();
|
|
|
|
// Check user token
|
|
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
|
$username = $user->getUsername($user_id)
|
|
// Fetch transaction summary
|
|
$aTransactionSummary = $transaction->getTransactionSummary($user_id);
|
|
|
|
// Output JSON format
|
|
$data = array(
|
|
'username' => $username,
|
|
'shares' => $statistics->getUserShares($username),
|
|
'hashrate' => $statistics->getUserHashrate($username),
|
|
'sharerate' => $statistics->getUserSharerate($username)
|
|
);
|
|
echo $api->get_json($data);
|
|
|
|
// Supress master template
|
|
$supress_master = 1;
|
|
?>
|