PHP code example of lessmore92 / php-ripple-lib
1. Go to this page and download the library: Download lessmore92/php-ripple-lib 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/ */
lessmore92 / php-ripple-lib example snippets
$options = [
'server' => 'https://s.altnet.rippletest.net:51234',
'timeOut' => 5,
];
$api = new \Lessmore92\Ripple\RippleAPI($options);
$server = $api->serverInfo();
var_dump($server);
$address = 'rEdhDpVvmryJcMNcFTzXW3hAmiCkUXUru6';
$balance = $api->accountInfo($address)->balance->toXrp();
var_dump($balance);
$txs = $api->accountTx($address, []);
var_dump($txs);
$fee = $api->getFee();
var_dump($fee);