my $mech = WWW::Mechanize->new();
$mech->get("https://blockchain.info/q/getreceivedbyaddress/".$btcaddress); # Check transactions on bitcoin address
my $getreceived = $mech->content;
$mech->get("https://blockchain.info/q/addressbalance/".$btcaddress); # Check balance on bitcoin address
my $addressbalance = $mech->content;
Exemplu rezultat: https://blockchain.info/q/getreceivedbyaddress/1GbVUSW5WJmRCpaCJ4hanUny77oDaWW4to => 900403294973
https://blockchain.info/q/addressbalance/1GbVUSW5WJmRCpaCJ4hanUny77oDaWW4to => 51689529709
Daca folosesc blockexplorer.com https://blockexplorer.com/api/addr/1GbVUSW5WJmRCpaCJ4hanUny77oDaWW4t ,rezultatul este...hacea-parcea.
Ca sa am acelasi rezultat ca pe blockchain,trebuie sa pun /balance dupa link,respectiv /totalReceived
https://blockexplorer.com/api/addr/1GbVUSW5WJmRCpaCJ4hanUny77oDaWW4to/balance
https://blockexplorer.com/api/addr/1GbVUSW5WJmRCpaCJ4hanUny77oDaWW4to/totalReceived
Acum...cum pun in cod..."/balance" si "/totalReceived" !?
Am incercat gen:
$mech->get("https://blockexplorer.com/api/addr/".$btcaddress/balance); # Check transactions on bitcoin address
$mech->get("https://blockexplorer.com/api/addr/".$btcaddress./balance); # Check transactions on bitcoin address
$mech->get("https://blockexplorer.com/api/addr/".$btcaddress "/balance"); # Check transactions on bitcoin address
$mech->get("https://blockexplorer.com/api/addr/.$btcaddress/balance"); # Check transactions on bitcoin address
insa...nici-o versiune nu functioneaza...
Astept un mic ajutor de la cunoscatori