I want to control devices using php. But don't have a clear idea how i'm going to do that. I googled and got to know about DIO functions. Eve by using them i don't have a clear idea how to do it practicably. If want to control my web cam trough website and do these things: 1st detect web cams available , let the user select one, after selecting i want to let the user view video and give user the ability to record web cam inputs...
Can some one give me an idea(loigic) how it is possible to do this with php?

thanx in advance

As a server-based language, PHP isn't really intended to control local devices. For security reasons, it is generally prevented from accessing anything on the local system except for a few explicit cases like files uploads and downloads. Javascript can be used for some local stuff (and that can be generated by a PHP program) but even that is limited in what it can (again for security reasons). As per the link below, you might have to use Flash, Silverlight or something like that.