/dev linux code example
Example: udg:///dev/ttyUSB0
$stream = stream_socket_client("udg:///dev/ttyUSB0", $errno, $errstr, 30);
fwrite($stream, "enable");
while(true){
$line = stream_get_contents( $stream );
if($line == 'exit'){
break;
}
}