PHP is a server side and scripting language used primarily on the web. PHP is used in approx 80% of all websites (for example and Brainboxes has provided a Brainboxes.IO PHP API to allow easy integration of Brainboxes Ethernet IO Modules (ED-xxx) into you PHP code.


  • Windows/Mac/Linux Computer
  • PHP Runtime (PHP 5.3.0 and above)
  • PHP Development Environment (e.g. Eclipse, PHP for Visual Studio, IntelliJ, NetBeans, or a simple Text Editor)
  • Brainboxes.IO API for PHP

Code Sample

The following sample code connects to a Brainboxes Ethernet IO Module and sends the ASCII command to get the device name

Brainboxes.IO PHP API Example code

<h1>Brainboxes.IO PHP API Example</h1>
This file is part of the javascript example/library code for communication with with 
Brainboxes Ethernet-attached data acquisition and control products, and is 
provided by Brainboxes Limited.  Examples in other programming languages are 
also available.
Visit to see our range of Brainboxes Ethernet-
attached data acquisition and control products, and to check for updates to
this code package.

This is free and unencumbered software released into the public domain.
use Brainboxes\IO\EDDevice as EDDevice;

$deviceIP = "";
//$01M means get device name
$command = "$01M";
$response = null;
<p>Attempting to connect to Brainboxes ED device at: <?php echo $deviceIP;?></p>

	$device = new EDDevice($deviceIP);
	$response = $device->sendCommand($command);

<p>Message sent: <?php echo $command; ?></p>
<p>Response: <?php echo $response; ?></p>


For a full list of ASCII protocol commands which can be sent to the device see:Brainboxes Remote IO ASCII protocol reference