Dear Sir, I would like to ask you some questons that would help me a lot in my project . i want to make a project for my faculty ,it makes php can control hardware objects so that i can do an operation on a machine by php when it is for example connected to usb or any port in other country . if that is possible please provide me with the tutorials to help me in that ,in both operating systems windows and linux and how to make a php code control a hardware (windows or linux) and which libraries and codes i can use plz i am not an expert in php so detailed tutorials are more welcomed thanks so much here is a similar project to what i want to do http://www.trackercam.com/TCamWeb/index.htm http://67.176.108.177:8090/Remote/index.php3 waiting 4 ur help thanks
You want to control the hardware of the server where php file are saved, or the hardware of the clients, who open the website ? ? I don't think this is possible for a client as php is a server side script, it will only send plein html to the computer of the client, but maybe possible with javascrip
it's impossible in php, it's a web language but you can run console applications that can do the usb/port stuff so basically php runs for ex. c++ application, which returns the result using the streams check the exec, system etc. commands in php
As far as I'm aware the only option you have is using the exec command under exec then echoing the output however I believe if there is hardware connected the server say a printer you can open a connection with it and communicate with it providing you know the necessary commands, these can usually be discovered by running a packet sniffer then doing what you would like to know the command for. I cant provide any detailed instructions or tutorials as it was a few years ago when I came across this while trying to write a php msn messenger client. Regards
i want to control the server where php files are located i want to connect a camera for example to a usb in it and give it commands how can i make php runs for example linux codes on server and this linux codes contain the control parts of hardware?
What sort of commands do you give, because if you are simply trying to access the files on the camera you can mount it as a drive I think (Im not really a linux user yet) and and create and alias for that mounted drive in your public_html or docroot folder Regards