control via internet

How can I control some hardware via internet, my program is written in C++.

Comments

  • : How can I control some hardware via internet, my program is written in C++.
    :

    If you want to run it from a browser, your best chance is to create an ActiveX control.
    Another way would be to have 2 programs, 1 on the server and 1 on the client computer and have the server send commands to the client, and then the client will do stuff with the hardware.
    What kind of hardware are you thinking of anyway ? And why do you need to control it over the internet ?
  • : : How can I control some hardware via internet, my program is written in C++.
    : :
    :
    : If you want to run it from a browser, your best chance is to create an ActiveX control.
    : Another way would be to have 2 programs, 1 on the server and 1 on the client computer and have the server send commands to the client, and then the client will do stuff with the hardware.
    : What kind of hardware are you thinking of anyway ? And why do you need to control it over the internet ?
    :

    ActiveX,that's the one I am thinking, but my lecturer told me that he tried before but failed, I am not sure it is possible or not. My scenerio is like this, people enter a website, they can control the lighting ,air-con, TV and so on from the internet. Now I can control those things locally, so the next step is make this control available on the net. Do you have any idea about API, another lecturer say this is also a way to achieve it. I am not a software guy, thanks for helping.

  • : How can I control some hardware via internet, my program is written in C++.
    :

    I'd look to convertin your C++ program to work as a CGI program so that you can call it straight from a webpage. Then you can just have an HTML form that would send any parameters your program needs in name=value pairs. Then you can use your existing code.

    If your program takes the parameters from the command line instead of during runtime then you are in a better position still. Write up a html form that posts to a PHP or ASP script and then have the script call your program.

    Ben Martin :-D
    programmer


  • : : How can I control some hardware via internet, my program is written in C++.
    : :
    :
    : I'd look to convertin your C++ program to work as a CGI program so that you can call it straight from a webpage. Then you can just have an HTML form that would send any parameters your program needs in name=value pairs. Then you can use your existing code.
    :
    : If your program takes the parameters from the command line instead of during runtime then you are in a better position still. Write up a html form that posts to a PHP or ASP script and then have the script call your program.
    :
    : Ben Martin :-D
    : programmer
    :

    Do u think ActveX control is also a choice? Thanks.
    :
    :

  • : Do u think ActveX control is also a choice? Thanks.

    I'm not too familiar with ActiveX, if I remember my course on VB and ActiveX components from 2 years ago... ActiveX runs on the client computer.

    It would be a LOT simpler to use a server side scripting language (ie a CGI program in C since you are already familiar with the language itself) to control the devices from ONE place. If you were to use an ActiveX control, it would run on the client machine, so you would then have to open a connection to the server (I assume that's the machine that would be controling the hardware...) and then send commands to the server telling it what to do. If that's the case it would be simpler to just send the data via a HTML form and have a CGI script either control the hardware directly or call your existing program and tell it what to do.

    Also, your cgi programs could check with a database for permissions, while you'd have to probably do more work with the ActiveX component if you don't want the whole world being able to change channels while you are watching TV... ;-)


    Ben Martin :-D
    programmer


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories