PHP code example of soulseekah / phpeosio

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

    

soulseekah / phpeosio example snippets


// Connect to local JSON RPC endpoint via HTTP
$client = new PHPEOSIO\Client( 'http://localhost:8888' );

// Add permission with private key
$client->add_key( 'soulseekah@active', '5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3' );

// Create, sign and push transaction
$client->push_transaction( 'eosio', 'bidname', [
	'bidder' => 'soulseekah',
	'newname' => 'phpeosio',
	'bid' => '1 EOS',
], 'soulseekah@active' );

// Send tokens via a transaction
$client->push_transaction( 'eosio.token', 'transfer', [
	'from': 'soulseekah',
	'to': 'eosio',
	'quantity': '10 EOS',
	'memo': 'Thank you for your service.',
], 'soulseekah@active' );

$client->get_info(); // Get chain info
$client->get_abi( $account ); // Get contract ABI
$client->get_table_rows( $account, $table, $scope ); // Get table rows