-
Notifications
You must be signed in to change notification settings - Fork 0
/
debug.php
118 lines (87 loc) · 2.97 KB
/
debug.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php
if (isset($_GET["lang"])){
$lang= $_GET["lang"];
}else{
$lang= "en";
}
require("controller/ethosclient.php");
require("helpers/langproc.php");
require("controller/datalyser.php");
require("model/bittrex-client.php");
//require("controller/ethosclient.php");
$c = new getlangString($lang, "welcome");
$pagecontent = $c->getPageContent();
$pagetitle = $c->getPageTitle();
?>
<html lang="<?php echo $lang ?>">
<head>
<link rel="stylesheet" type="text/css" href="assets/css/style.css">
<title><?php echo $pagetitle ?></title>
</head>
<body>
<?php
//echo '<pre>' . print_r($pagecontent, true) . '</pre>';
//echo "<h4>".$pagecontent["str1"]."</h4>";
$o = new ethosClient("russia", "summary");
//$o = new ethosClient("fd99b1", "summary");
$url= $o->getURL();
echo $url."<br/>";
echo $o->error_message;
$o->sendRequest($url);
$ethos_response = $o->response_content;
if($o->error ) echo $o->error_message;
else echo $o->error_code;
/**/
$alldata= $ethos_response;
$d = new analyseJSON();
$callExchange=new bittrexClient();
$tradepairs=array("BTC"=>"USDT-BTC","ETH"=>"USDT-ETH","ZEC"=>"USDT-ZEC","XMR"=>"USDT-XMR");
$tradevalues=array();
foreach ($tradepairs as $pair=>$value){
$call = $callExchange->sendRequest($value);
$tradevalues = $callExchange->response_content;
echo '<pre>' . print_r($callExchange->curl_status_code, true) . '</pre>';
echo '<pre>' . print_r($callExchange->response_content, true) . '</pre>';
}
?>
<div style="color: aqua;">
<?php
echo '<pre>' . print_r($alldata, true) . '</pre>';
?>
</div>
<?php
//summary - per_info
$summary = $alldata['per_info'];
foreach($summary as $algo_miner=>$sum_info){
?>
<div>
<h3><?php echo $algo_miner ?> </h3>
<h5>Total Hash: <?php echo $sum_info["hash"]." ".($algo_miner=='claymore'?'MH/s':'Sol/s'); ?></h5>
<h5>Total Rigs: <?php echo $sum_info["per_total_rigs"]; ?></h5>
<h5>Offline: <?php echo $sum_info["per_total_rigs"]-$sum_info["per_alive_rigs"]; ?></h5>
<h5>GPUs: <?php echo $sum_info["per_alive_gpus"]."/".$sum_info["per_total_gpus"]; ?></h5>
<span>Checked at: <?php echo date('H:i d/m', $sum_info["current_time"]); ?></span>
</div>
<div>
<?php
}
$rigsdata=$alldata['rigs'];
$gpuinfo=$d->getAllGPU($rigsdata);
//echo '<pre>' . print_r($gpuinfo, true) . '</pre>';
foreach($gpuinfo as $rigname=>$gpus){
//echo '<pre>' . print_r($gpus, true) . '</pre>';
}
$gpu_json = file_get_contents("model/gpu-info.json");
$gpu_info = json_decode($gpu_json, true);
echo json_last_error();
//echo '<pre>' . print_r($gpu_info, true) . '</pre>';
//f1810f
//$g = new ethosClient("fd99b1","graph","f1810f","temp");
//echo $g->getURL()."<br/>";
//if($g->error) echo $g->error;
//else
?>
</div>
<div><span class="label label-success">test</span></div>
</body>
</html>