Read data from serial port...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mfalomir
Forum Newbie
Posts: 6
Joined: Tue Nov 05, 2002 9:29 pm

Read data from serial port...

Post by mfalomir »

Hello....How can i read incoming data from my serial port (com1).... I have a PBX sending data to a "billing" PC through COM1 port, and I want to somehow read it and display it in a web page....is there a possible way to do it???? I would really appreciate some help :) please :)

Thanx....

BTW my pc runs Windows 2k
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

if I remember correctly one can access the com-ports within a commandline window via COM1:, COM2:, ...
and in C

Code: Select all

HANDLE hCommResource = CreateFile( "\\\\.\\COM1", ....
opens COM1. One of those filenames might be working with php/win32, too, but I have no serial-port device to test it ;)
Post Reply