Re: [PHP] How to write and read serial or parallel port

2012-07-26 Thread Lester Caine
Alex Nikitin wrote: So for serial for example, you can just open the port up and work with it like a socket; read/write binary data. As far as parallel port goes, trickier, you may need to call out to an external program, or write a module if you need direct interaction in php. Real question is w

Re: [PHP] How to write and read serial or parallel port

2012-07-26 Thread viper
many thanks! i'll try all your solutions to find the best one! On Thu, Jul 26, 2012 at 2:37 PM, Alex Nikitin wrote: > Real question is > why in the world would you want to use PHP for this to begin with. I > mean sure you can write your own vfat implementation in PHP, etc, etc, > but it doesn't m

Re: [PHP] How to write and read serial or parallel port

2012-07-26 Thread Curtis Maurand
Lester Caine wrote: > viper wrote: >> is it possible to write and read data on a COM or LPT port? >> is there any function or class in PHP? >> >> anyone has already done something similar? > > Talking in and out of the serial port is not too difficult but is OS > dependent, > so what are you wan

Re: [PHP] How to write and read serial or parallel port

2012-07-26 Thread Curtis Maurand
You read and write to it like any other file.  Calls on windows will be slightly different. $PRINTERPORT = fopen("/dev/lpt1", "r+"); $PRINTERPORT = fopen("lpt1", "r+"); Cheers, Curtis viper wrote: > hi all! > > is it possible to write and read data on a COM or LPT port? > is there any fu

Re: [PHP] How to write and read serial or parallel port

2012-07-26 Thread Alex Nikitin
On Thu, Jul 26, 2012 at 6:24 AM, Lester Caine wrote: > viper wrote: >> >> is it possible to write and read data on a COM or LPT port? >> is there any function or class in PHP? >> >> anyone has already done something similar? > > > Talking in and out of the serial port is not too difficult but is O

Re: [PHP] How to write and read serial or parallel port

2012-07-26 Thread Lester Caine
viper wrote: is it possible to write and read data on a COM or LPT port? is there any function or class in PHP? anyone has already done something similar? Talking in and out of the serial port is not too difficult but is OS dependent, so what are you wanting to run on? Most of the time you ar

[PHP] How to write and read serial or parallel port

2012-07-26 Thread viper
hi all! is it possible to write and read data on a COM or LPT port? is there any function or class in PHP? anyone has already done something similar? thanks, viper -- + http://vipertechnology.dyndns.org () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against propri