BitMessagePlugin plugin for CakePHP3
A tip of the hat to Convertor, who created the PhpBitMessage class. I had to do this as a plugin to make the class available to CakePHP. All credit goes to him. All I did was reformat it for usage in CakePHP.
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require mmxca/BitmessagePlugin
Plugin::load('BitmessagePlugin', ['bootstrap' => false, 'routes' => true]);
public $components = ['BitmessagePlugin.Bitmessage'];
'BitMessage' => [ 'rpc_url' => 'http://localhost:8442', 'rpc_username' => '*USERNAME*', 'rpc_password' => '*PASSWORD*', 'debug' => 0, 'cookie' => 'bitmessage_cookie.txt', 'cache' => 0 ],
$this->Bitmessage->initialize(); $this->Bitmessage->setStrip(true); //to, from, subject, message $this->Bitmessage->sendMessage(*TO_ADDRESS*, *FROM_ADDRESS*, "Test Subject", "Test Message Body" );