GoldCoin Talk

Economy => Service Discussion => Topic started by: tercel on December 17, 2013, 08:38:23 AM

Title: Blockchain Problem...
Post by: tercel on December 17, 2013, 08:38:23 AM
Just want to ask a small question...

In every cryptocurrency, there will be sites to check address, blocks, nethash, etc.

http://blockchain.info
is an awesome one for bitcoin.

Goldcoin also have one at http://gld.cryptocoinexplorer.com

But I think it a little bit too simple, the API even not working.

I want to start one with some fuctions, however :D, I don't know how to start with.

I know how to coding, I wonder how can I get those blocks and address info or anything else from those available nodes directly?

Please help me, just give me simple directions is okay. Or you can throw sample code to me.

Say thank you first to those who answer me :):D XP







------------Signature------------

►Skype◀
Tercel999999

►E-Mail◀
[email protected]

►QQ◀
2854989868

►GLD Donate◀ DxY66ngrLmvkfb6mZskqT78N3z8TrpYDQG

---------------End---------------


Title: Re: Blockchain Problem...
Post by: tadspoles on December 17, 2013, 09:28:06 AM
Just want to ask a small question...

In every cryptocurrency, there will be sites to check address, blocks, nethash, etc.

http://blockchain.info
is an awesome one for bitcoin.

Goldcoin also have one at http://gld.cryptocoinexplorer.com

But I think it a little bit too simple, the API even not working.

I want to start one with some fuctions, however :D, I don't know how to start with.

I know how to coding, I wonder how can I get those blocks and address info or anything else from those available nodes directly?

Please help me, just give me simple directions is okay. Or you can throw sample code to me.

Say thank you first to those who answer me :):D XP







------------Signature------------

►Skype◀
Tercel999999

►E-Mail◀
[email protected]

►QQ◀
2854989868

►GLD Donate◀ DxY66ngrLmvkfb6mZskqT78N3z8TrpYDQG

---------------End---------------

QuarkCoin copied parts of blockchain.info and made one.  It would be real nice if we could do the same for GoldCoin.

http://quarkexplorer.com/
Title: Re: Blockchain Problem...
Post by: Stouse49 on December 17, 2013, 11:24:36 AM
The API at gld.cryptocoinexplorer.com works for me:

This code will query execute a command with its parameters (PHP).

Code: [Select]
function QueryBlockChain($command, $params)
{
$server = "http://gld.cryptocoinexplorer.com/chain/Goldcoin/q/";

$address = $server . $command . $params;

$fp = fopen($address, "r");
if($fp)
{
$result = fgets($fp,128);

fclose($fp);

return $result;
}
return "Cannot Read File";
}

This will retrieve some information such as the Network Hash Rate and the Block Count:
Code: [Select]
$nethash = QueryBlockChain("getnetworkhash", "");
$blockcount = QueryBlockChain("getblockcount", "");
      $difficulty = QueryBlockChain("getdifficulty", "");

The API is here:  http://gld.cryptocoinexplorer.com/q

The help on each command may be lacking, for instance for getdifficulty:

Quote
Shows the difficulty of the last block in CHAIN.
/chain/CHAIN/q/getdifficulty
To use it access this URL:  http://gld.cryptocoinexplorer.com/chain/GoldCoin/q/getdifficulty

Hope this helps.
Title: Re: Blockchain Problem...
Post by: tercel on December 17, 2013, 08:56:09 PM
Thanks for ypur help!
I also get info from that site you mentioned now.
But actually I think it has too few fuctions, I want to create one my own.

I don't want my coin explorer to get info throught another blockexplorer, what can I get them directly.

Title: Re: Blockchain Problem...
Post by: Stouse49 on December 18, 2013, 02:46:56 AM
In that case, you will need to run the daemon on your site (goldcoind) and you can then use RPC commands to access the data from the blockchain.

from the command prompt, you would run this command:

Code: [Select]
goldcoind --daemon
and then this command from another prompt or within your own software:

Code: [Select]
goldcoind getdifficulty
The list of commands available can be seen by going to the GoldCoin Client and clicking Help | Debug Window, then type "help"
Title: Re: Blockchain Problem...
Post by: tercel on December 18, 2013, 09:09:29 AM
ok, so after I run the daemon on (A) server, it will be the RPC server side right?
Then I can create a client such as php use jsonrpc then send request to (A)? (and the commamd I can use is in the "help" )

If I misunderstand plz forgive me.
Thank you for your patience and reply @Stouse49.
:):):):D:D
Title: Re: Blockchain Problem...
Post by: Stouse49 on December 18, 2013, 09:54:34 AM
Yes, you understand how to do it!
Title: Re: Blockchain Problem...
Post by: tercel on December 18, 2013, 09:58:51 AM
Yes, you understand how to do it!

one more problem is...
I tried to execute goldcoind.exe, it says no ***c++6.dll.

I download it and run again, it still can't work.

I'm on win7, is anything wrong with goldcoind?
Title: Re: Blockchain Problem...
Post by: tercel on December 18, 2013, 10:02:56 AM
Yes, you understand how to do it!


and QtCored4.dll lost
Title: Re: Blockchain Problem...
Post by: Stouse49 on December 18, 2013, 10:53:54 PM
I haven't had any trouble with goldcoind.  It was in the same folder as goldcoin-qt, which has all the required dll files.  I run Windows 7.