PHP code example of lox / localbtc-php

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

    

lox / localbtc-php example snippets




$client = \LocalBtc\Client::factory(array(
    'client_identifier' => '1234567',
    'access_token' => 'generated access token goes here',
));

// get data about yourself
$myself = $client->myself()->get('data');

// get data about someone
$someone = $client->accountInfo(array('username'=>'someone'))->get('data');

// get your escrows
$escrows = $client->escrows()->get('data');

// release an escrow
$client->releaseEscrow(array('escrow_id'=>123456));


bash
git clone https://github.com/lox/localbtc-php.git
composer install

export LOCALBITCOINS_CLIENT_ID=1234567
export LOCALBITCOINS_CLIENT_SECRET=123456

php oauth.php --authorize