Last month there were at least two enquiries at the Bangalore PHP UG on how to get PHP to communicate with the server’s serial port. I didn’t think it was possbile, but here’s what a quick google search turned up:
PHP Serial Extension:
This PHP extension for Windows allows you to communicate directly with the serial port through PHP.
This is a loadable extension for PHP running on Windows implementing serial port handling and communications. Once installed in PHP environment you can programm PHP applications to control serial device hosted on server from remote location; these devices can be anything from video switcher, cameras pan/tilt, ham radios, media players, home automation boxes, GSM modems/terminals (send/receive SMS), only your imagination and needs are the limits.
Link: http://www.easyvitools.com/phpserial/index.html
Link to installation instructions and usage: http://www.easyvitools.com/phpserial/php_ser_reference.html
PHP Serial Class
If you’re a solution in Linux, here’s the PHP class you’re looking for. PHPClasses.org has a PHP Serial Class which allows you interact with your serial ports in Linux
This class can be used to communicate and configure peripherals connected to a serial port under Linux, simplifying the development of applications that need access serial devices. It takes the path of serial device and checks whether it is valid before opening a connection to it. Once the connection is opened, it can send data to the serial port. The class may also change connection parameters for the given serial device.
Link: http://www.phpclasses.org/browse/package/3679.html
If you’ve used any of these solutions for your applications, do let me know your feedback.





