dev-master
9999999-dev https://github.com/createproblem/bitmessage-phpBitmessage PHP library
MIT
The Requires
- php >=5.3.2
bitmessage
Bitmessage PHP library
Bitmessage-php is a backend library to communicate with an installed [Bitmessage][1] client., (*1)
In this context the installed Bitmessage client is the server where the communication passed., (*2)
Bitmessage-Api features to communicate with the client gui directly are not inclueded. Its a server side library., (*3)
You can install bitmessage-php using composer, (*4)
"require": { "username/bitmessage-php": "dev-master" }
or just typing composer require username/bitmessage-php
, (*5)
Example: Hello World, (*6)
$bmc = new Bitmessage\BitmessageClient('localhost', 8442, 'testUser', 'testPw'); echo $bmc->test('helloWorld', 'Hello', 'World'); Hello-World
Example: Create Random Address, (*7)
$bmc = new Bitmessage\BitmessageClient('localhost', 8442, 'testUser', 'testPw'); echo $bmc->createRandomAddress('Test-Label'); BM-2D7QKHUhFGd7SKwtVSzawWpB3Mmw5j8BNw
Example: Send message, (*8)
$bmc = new Bitmessage\BitmessageClient('localhost', 8442, 'testUser', 'testPw'); echo $bmc->sendMessage('to-address', 'from-address', 'subject', 'message'); b3ce1c0308eb0765e0c67eeaf851fc8d0d752359c8f1e499d1fe02e39affbc67
NOTICE, (*9)
The
from-address
have to be present as an identity in the bitmessage client., (*10)
You can run all unit tests at once by executing phpunit
in the root directory., (*11)
~/bitmessage-php $ phpunit
, (*12)
Bitmessage PHP library
MIT
bitmessage