Bitcoin Forum
July 10, 2024, 09:13:08 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to get current Net Hashrate by PHP?  (Read 659 times)
gri0 (OP)
Sr. Member
****
Offline Offline

Activity: 253
Merit: 250



View Profile
May 31, 2014, 08:05:31 AM
 #1

Hello!
I want to get some stats for the crypto currency.
Tell me please, is it possible to get current Net Hashrate by PHP?
Or I need to parse some third party sites for it?


br,
Grio.
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
May 31, 2014, 01:57:50 PM
 #2

There is no way to measure it directly because you're
talking about the sum of all miners across the global
bitcoin network.  The best you can do is to calculate
an estimate based on the current difficulty level and the time
between blocks, and of course it is always changing.

If you don't already have a PHP code library which
parses the blockchain, then the easiest thing
to do is probably use an API service such as
the one provided by blockchain.info.

gri0 (OP)
Sr. Member
****
Offline Offline

Activity: 253
Merit: 250



View Profile
May 31, 2014, 02:36:48 PM
 #3

Thanks, Jonald!
The problem is I need to get the difficulty levels from some different cryptocurrencies.
And there is not service such as blockchain.info for them.
Maybe some of them do not have a block explorer yet Smiley
What is the way to get info in this case?
I mean, the service like a whattomine.com, how they get the levels and rates?

br,
Grio.
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
May 31, 2014, 03:04:59 PM
 #4

other cryptocurrencies use different blockchain and different code.
The code should be open source for each currency.

Some currencies change difficulty every block.  In most
cases, I think the difficulty level is at least stored in
each block.  So you will have to write your own code
to check this if the code isn't out there.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!