Hardware Acess through Web Technologies

Discussion in 'Mac Programming' started by vorbb, Oct 15, 2010.

  1. macrumors member

    Joined:
    Aug 18, 2010
    #1
    Does anyone know if there's any API's or methods in any web development language that can access local hardware?

    Specifically, hard drive (this is more likely) and USB (I expect this is a little far fetched).
     
  2. macrumors regular

    Joined:
    Mar 5, 2004
    #2
    The security restrictions on web browsers do not allow access to local hardware.
     
  3. macrumors 68000

    Joined:
    Mar 29, 2009
    Location:
    USA
    #3
    It can be done. Everything has a web interface on it these days. Cameras, printers, even our security system.

    I would imagine you would allow the website to call scripts on your the machine that interacted with hardware. You would have to set the permissions correctly in your browser, however.
     
  4. macrumors 6502a

    Joined:
    Sep 30, 2001
    #4
    No, that most certainly cannot be done. The exception is through plug-ins like 'flash' and 'java', but I hesitate to calls those web technologies.
     
  5. macrumors 6502a

    Joined:
    Jan 15, 2007
    #5
    You seem to be mixing up the roles of client and server. Your camera has a web interface that can access the local hardware because it has a web SERVER running on the camera, the web server can be configured to access whatever resources the admin has allowed it to. In this case your computer is the client and is accessing resources on the server.

    The OP was basically asking if the reverse is possible, ie is it possible for a web server to access resources on a client. The short answer as others have stated is no, there are just too many trust issues involved. The long answer is that it depends on what the OP means by "access". For instance it's certainly possible for a user to upload files from the hard drive to the server, but the web server can only see what the user has allowed it to see. It cannot for instance list a bunch of files and then select the file it wants without user interaction.
     
  6. macrumors 68000

    Joined:
    Mar 29, 2009
    Location:
    USA
    #6
    Anything is possible. Dell has a section on their website that allows their web page to read your express service code and then shows you the support options available for your particular model computer.

    That's just one example.
     
  7. macrumors regular

    Joined:
    Mar 5, 2004
    #7
    That is only possible because Dell's site uses an ActiveX control, so it only works on Internet Explorer under Windows. The user must also explicitly grant permission to the ActiveX control before it can access any hardware.
     

Share This Page