PHP code example of gegosoft / laravel-rippledrpc

1. Go to this page and download the library: Download gegosoft/laravel-rippledrpc 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/ */

    

gegosoft / laravel-rippledrpc example snippets




use gegosoft\Rippled\Client;

$client = new Client('https://s1.ripple.com:51234');

$balance = null;

$response = $client->send('account_info', [
    'account' => 'rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn'
]);

// Set balance if successful.
if ($response->isSuccess()) {
    $data = $response->getResult();
    $balance = $data['account_data']['Balance'];
}

composer