PHP code example of tugmaks / php-coin-core
1. Go to this page and download the library: Download tugmaks/php-coin-core library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tugmaks / php-coin-core example snippets
Tugmaks\CoinCore\Client\ClientFactory;
use Tugmaks\CoinCore\Client\RpcClient;
use Tugmaks\CoinCore\Configuration;
$conf = new Configuration('http://127.0.0.1', 9332, 'guest', 'guest');
$client = ClientFactory::create($conf);
$rpcClient = new RpcClient($conf->getUrlAndPort(), $client);
echo $rpcClient->getBalance();