Is it possible to get the hardware details with php script.Also is it possible to check whether a pen drive or something is connected to the pc via php script. So when users loa
Yes, we can use PHP to get OS hardware information via Linfo library.
Here is an example of the PHP script to show CPU info:
<?php
$linfo = new \Linfo\Linfo;
$parser = $linfo->getParser();
var_dump($parser->getCPU());
?>
Here is the source code of Linfo library: https://github.com/jrgp/linfo
Not with code that runs on server.
But with JavaScript run on client you can use some hardware features. For example camera, microphone, gamepads... See www.gamepadjs.com for example.
To be clear: Javascript is always executed on client-side in the users browser. It does not have access to any hardware, mostly for security reasons. Therefore it's not possible to do that in Javascript.
PHP is executed purely on the server, and it does have (limited by some restrictions) access to the hardware of the server - but in no way it has access to the hardware of a users computer.
Therefore no, it's not possible to do that. The only way I can think of is using ActiveX plugins or a browser addon.
With PHP the answer is NO. PHP run on server-side...
What "hardware details"? What level of detail do you want? PHP generally runs serverside, when users view a webpage php does not run locally on their PC. This is not possible via JavaScript. There are security implications in this concept. Would you want any webpage to be able to find out what's conneccted to your computer, and what the spec of the machine is?
The short answer is no,you won't be able to get things like RAM, HDD space, etc... and even what you can get can easily be spoofed. So the short answer is no, you can't do that with php. You would need to make and have the user download and run something on their computer (like a java applet or activeX control) that can access that sort of stuff.