He instalado este dogeapi: https://github.com/ummjackson/dogeapi-php
En el server esta así:
Librería del DogeApi: http://dados.coinspain.es/lib/dogeapi.php.php
PHP para la prueba de funcionalidad: http://dados.coinspain.es/lib/testdogeapi.php:
Código:
y el resultado: <?php require_once 'dogeapi.php'; $dogeAPIKey = "mi api key"; $doge = new DogeAPI(); $validKey = $doge->set_key($dogeAPIKey); if($validKey) { echo "Yay, it's a valid API key\n\n<br><br>"; $balance = $doge->get_balance(); $address = $doge->get_my_addresses(); $difficulty = $doge->get_difficulty(); $current_block = $doge->get_current_block(); echo "Your current balance is " . $balance . "Ɖ\n"; //echo "Your current address is " . print_r($address,true) . "\n"; //echo "The current difficulty is " . $difficulty . "\n"; //echo "The current block is " . $current_block . "\n"; } else { echo "The API Key (" . $doge->get_key() . ") is not a valid API key"; } ?>
Yay, it's a valid API key
Catchable fatal error: Object of class stdClass could not be converted to string in /home2/coinspai/public_html/dados/lib/testdogeapi.php on line 16
Alguien sabe como solucionar esto?