composer require partner-it/b2-php
Instantiate a new client and get a token:
$client = new \B2\B2Client('accountid', 'applicationKey');
$client->requestToken();
$client->Files->uploadFile('bucketId', '/my/local/path/image.jpg', 'image.jpg', 'image/jpeg');
Download a file by name:
$data = $b2Client->Files->downloadFileByName('bucketname', 'image.jpg');