PHP code example of abraovic / peercoin-php-rpc
1. Go to this page and download the library: Download abraovic/peercoin-php-rpc 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/ */
abraovic / peercoin-php-rpc example snippets
$client = new RpcClient("localhost");
try {
$client->auth("peercoinrpc", "4sQWxWJdFcg3wNXm5kLAW5CXGRr9nsZQEaaGZd2pDhVH");
$response = $client->getInfo()->getBlockCount()->execute();
} catch (\Peercoin\Exceptions\RpcException $e) {
var_dump($e->getMessage());
}
composer