Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/05/2014, 07:35
jjbreaker
 
Fecha de Ingreso: agosto-2010
Mensajes: 17
Antigüedad: 13 años, 7 meses
Puntos: 0
Catchable fatal error: Object of class stdClass could not be converted to string

Hola phperos! estoy implementando DogeCoin en mi web de juego con bitcoin.

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:
<?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";
}
?>
y el resultado:

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?