PHP-USBLCD direct communication

It's possible to use a Matrix Orbital USB-LCD (or a home made clone) with PHP and Linux without LCDProc or other software.
We'll need to know some commands to send to the LCD, these can be found in the manual.

The home made LCD's code and schematic is here.

The device uses the cdc-acm module and can be found as /dev/ttyACMn, where n is 0, 1 or some other number. This can be used to print to the LCD display:

//Open connection
$handle = fopen("/dev/ttyACM0", "w");
//Clear screen
fwrite ($handle, chr(254));
fwrite ($handle, chr(88));
//Write text
fwrite($handle, "Row1");