开发者

Is it possible to detect usb devices using php?

Is it po开发者_JAVA技巧ssible to detect usb mouse,keyboard or flash drives when they are connected using php?


Which side - server side or client side?

Server side: possible, although probably not a good idea. You would call OS specific functions or shell commands to access USB (e.g. shell_exec("lsusb -v"); ), and process the results.

Client side: No. PHP just works on server side.

Commandline PHP: same as Server side.

You are using the wrong tool for the job. Go back and use one more suited to the task.


This is not really a matter of PHP, but of the underlying operating system. If the operating system detects it and makes the information readable for the user that runs the PHP script, you can "detect" devices using PHP.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜