PHP code example of foxrp / rippled-php

1. Go to this page and download the library: Download foxrp/rippled-php 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/ */

    

foxrp / rippled-php example snippets




use FOXRP\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