This is an implementation of a CloudPRNT server in PHP.
See also: https://github.com/star-micronics/cloudprnt-sdk
This service from Star has information scattered across the web. For example, Star Micronics USA is pretty thin; but Star EMEA has a nice overview. However Star M Japan has incredible documentation of the protocol. Confusing but, it's all different parts of the same global company.
git clone $REPO /opt/openthc/cloudprnt-server
sudo make install
Then configure Apache/Nginx as desired.