Question

I want to create a page which is able to automatically detect a users computer spec and hardware they are using. Is there some way i can find this out? Has someone perhaps already created something which does this i can use?

The information I am interested in displaying on a web page is:

  • cpu
  • ram
  • mouse
  • keyboard
  • monitor
Was it helpful?

Solution

PHP is a server-side language. You are not able to detect computer specs. However, you can use JavaScript to detect some basic screen related things like resolution, pixel depth, colors etc.

PHP is able to detect network information and some settings.

http://www.php.net/manual/en/reserved.variables.server.php

OTHER TIPS

It sounds like an exploit into users' privacy. There won't be any universal way to do that but there may be ways for certain combinations of operating systems, browsers and plugins. You could certainly use a browser extension users could install in their computers, or even a binary executable that would send out the results that could later be accessed on your website.

In JS you can get some of this information:

Computer Memory (only supported in chrome):

console.log('Memory', navigator.deviceMemory);

Computer Cores:

console.log('Cores', navigator.hardwareConcurrency);

Connection Speed:

console.log('Connection', navigator.connection);

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top