Hardware control by php‏

Discussion in 'PHP' started by legend19892008, Mar 20, 2009.

  1. #1
    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
     
    legend19892008, Mar 20, 2009 IP
  2. Ilyes

    Ilyes Banned

    Messages:
    129
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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 :)
     
    Ilyes, Mar 20, 2009 IP
  3. basecore

    basecore Peon

    Messages:
    47
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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
     
    basecore, Mar 20, 2009 IP
  4. Frozennova

    Frozennova Peon

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    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
     
    Frozennova, Mar 20, 2009 IP
  5. legend19892008

    legend19892008 Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    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?
     
    legend19892008, Mar 21, 2009 IP
  6. Frozennova

    Frozennova Peon

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    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
     
    Frozennova, Mar 22, 2009 IP
  7. legend19892008

    legend19892008 Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    thanks
    but i need more code description from any one who know
     
    legend19892008, Mar 22, 2009 IP