Advertisement
JudeAustin

Untitled

Nov 17th, 2012
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <?
  2. function getdata($url)
  3. {
  4. $ch = curl_init();
  5. curl_setopt($ch, CURLOPT_URL, $url);
  6. curl_setopt($ch, CURLOPT_HEADER, 0);
  7. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  8. return curl_exec($ch);
  9. curl_close($ch);
  10. }
  11. $a = json_decode(getdata("http://198.23.134.72:9327/local_stats"), true);
  12. $A = json_decode(getdata("http://198.23.134.72:9327/current_payouts"), true);
  13. $c = 0;
  14. $client = $a['miner_hash_rates'][$ltcaddr];
  15. $shares = $a['shares_total'];
  16. $speed = round(($client / 1000), 3);
  17. foreach ($a['miner_hash_rates'] as $key => $value) {
  18. $c += round(($value / 1000), 3);
  19. }
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement