Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

vorbb

macrumors member
Original poster
Aug 18, 2010
47
0
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).
 

vocaro

macrumors regular
Mar 5, 2004
120
0
Does anyone know if there's any API's or methods in any web development language that can access local hardware?

The security restrictions on web browsers do not allow access to local hardware.
 

robvas

macrumors 68040
Mar 29, 2009
3,240
629
USA
The security restrictions on web browsers do not allow access to local hardware.

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.
 

holmesf

macrumors 6502a
Sep 30, 2001
528
25
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.

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.
 

foidulus

macrumors 6502a
Jan 15, 2007
904
1
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.

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.
 

robvas

macrumors 68040
Mar 29, 2009
3,240
629
USA
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.
 

vocaro

macrumors regular
Mar 5, 2004
120
0
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 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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.