A Localbitcoins Client for PHP with minimal dependencies. Should work right off the box.
Documentation for the Localbitcoins API can be found here: https://localbitcoins.com/api-docs/.
Make sure you have cURL enabled in your php environment.
php --ri curl
you should see this text on your terminal:
cURL support => enabled
Install with composer
composer require bradtech/localbitcoins-client
To use the HMAC Authentication Client, create a newHMACAuthenticationClient
object and
initialize with the HMAC key and secret from Localbitcoins.
<?php
// you can load the files dynamically
require_once 'vendor/autoload.php';
use Bradtech\LocalbitcoinsClient\HMACAuthenticationClient;
$hmac_key = 'HMAC_KEY';
$hmac_secret = 'HMAC_SECRET';
$client = new HMACAuthenticationClient($hmac_key, $hmac_secret);
$data = $client->getWalletAddress();
var_dump($data);