PHP code example of phillipsdata / boca
1. Go to this page and download the library: Download phillipsdata/boca 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/ */
phillipsdata / boca example snippets
use PhillipsData\Boca\Connection;
use PhillipsData\Boca\Transport;
$connection = new Connection('tcp://127.0.0.1:9100');
$connection->open();
$transport = new Transport($connection);
$response = $transport->send('<MAC>\n\n');
$connection->close();
echo $response; // outputs something like: MAC Address: 00:0D:00:00:01