如何将数据从网页发送到串口? [英] How can I send data from a web page to a serial port?
问题描述
我有一个包含基本内容的网页。我可以想象它的格式,但它现在是PHP。我想将此数据发送到我计算机的一个串行端口(作为PHP页面的访问者)。
我需要一个代码将这些数据从互联网传输到互联网一个串行端口。它可以是C ++,javascript,C#或任何其他。
我使用Windows(作为网页的访问者)。所以,我需要发送数据到访问者的计算机的串行端口,而不是服务器的。
哪个程序和过程是正确执行此操作的最佳选择?我需要示例代码部分,他们工作很好!
有一个PHP库支持写入串口。 / p>
请参阅这里。 / p>
更多:
http://php.net/manual/en/function.fopen.php#20935
有关更多讨论,请参阅此问题:
如何读取PHP中的RS232串行端口,像这样的QBasic程序
更新: b
要在Windows上执行此操作,请参阅本教程:
http://blog.950buy.com/article/php-use-rs232-serial-communication-to-send-file/
还有这个问题: Windows上的PHP串口通讯< a>
I have a web page which includes a basic content. I can chance its format but it is PHP now. I want to send this data to one of the serial ports of my computer (as a visitor of PHP page).
I need a code for transferring this data from internet to one of the serial-ports. It can be C++, javascript, C# or anything else.
I am using Windows (as a visitor of web page). So, I need to send datas to serial port of visitor's computer not server's. Reading is not necessary.
Which program and process is the best option to do this properly? I need example code parts that they work just fine!
There is a library for PHP that supports writing to serial port.
See here.
More:
http://php.net/manual/en/function.fopen.php#20935
See this question for more discussion: How to Read RS232 Serial Port in PHP like this QBasic Program
Update:
To do this on windows see this tutorial: http://blog.950buy.com/article/php-use-rs232-serial-communication-to-send-file/
Also this question: Serial comm with PHP on Windows
这篇关于如何将数据从网页发送到串口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!