I decide that I would like to be able to control and monitor the K8055 USB interface board remotely from a web page. It quickly became evident that I would need to write a Visual Basic application that could receive data from the internet and have a web page that could send data to my visual basic program.
Unfortunately I do not have a server at home so communication between my Visual Basic application and the web page would have to go via my web site server.
Communication from the Internet in Visual Basic was achieved using the Internet Transfer Control. In my example I decided for simplicity I would read a single value from a text file using HTTP.
The control web page however was a little trickier as I decided control needed to be via two buttons i.e. ON and OFF. In order for values to be passed from the page without submitting a form then I would need to use Asynchronous JavaScript or Ajax as it is more commonly known.
I had a small understanding of Ajax and after a little searching around I found some examples that I was able to modify and eventually got the whole thing working. |