Post
Topic
Board Web Wallets
Topic OP
Blockchain.info RPC JSON API
by
carlosdelagarza
on 23/01/2017, 02:01:59 UTC
When I make a API call to my wallet on Blockchain.info it gives me the error:

Warning:  fopen(): php_network_getaddresses: getaddrinfo failed: No address associated with hostname in /home/u2485/public_html/jsonRPCClient.php on line 132

Unable to connect to http://mywalletID:mypassword@rpc.blockchain.info:80/' in /home/u2485/public_html/jsonRPCClient.php:140


I'm using the jsonRPCClient.php to communicate to bitcoin server.

I have my config.php file where I specify login, pass, ip, port, etc.

Code:
      $rpc = array(
'login' => 'mywalletID',
'password' => 'mypassword',
'ip' => 'rpc.blockchain.info',
'port' => '80'
?>

And here is the file where I'm connecting with blockchain.info

Code:
include('config.php');

require_once 'jsonRPCClient.php';
$client = new jsonRPCClient('http://' $rpc['login'] . ':' $rpc['password'] . '@' $rpc['ip'] . ':' $rpc['port'] . '/') or die('Error: could not connect to RPC server.');
echo 'Done.';
?>

source: http://blockchain.info/es/api/json_rpc_api