Page 1 of 1

Php script to view computers hardware information

Posted: Thu May 06, 2010 9:32 am
by xionhack
Hello. I am trying to make a help desk application in php. Is there any way to make a script to show ur computer specs? Thanks

Re: Php script to view computers hardware information

Posted: Thu May 06, 2010 9:44 am
by Weirdan
By computer spec do you mean the spec of server running the php script or the client accessing the script via http(s)?

Re: Php script to view computers hardware information

Posted: Thu May 06, 2010 9:52 am
by xionhack
The client accessing via http

Re: Php script to view computers hardware information

Posted: Thu May 06, 2010 9:53 am
by Apollo
If with "ur" you mean the visitor's computer, then no. PHP runs server-side and does its thing before the output is sent to the visitor.

Re: Php script to view computers hardware information

Posted: Thu May 06, 2010 9:56 am
by xionhack
Thats right. Do u know of any way I can accomplish that?

Re: Php script to view computers hardware information

Posted: Thu May 06, 2010 11:54 am
by xtiano77
You might be able to get some limited information about the client's computer by using:

'HTTP_USER_AGENT'
Contents of the User-Agent: header from the current request, if there is one. This is a string denoting the user agent being which is accessing the page. A typical example is: Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586). Among other things, you can use this value with get_browser() to tailor your page's output to the capabilities of the user agent.

http://www.php.net/manual/en/reserved.v ... server.php
http://www.php.net/manual/en/function.get-browser.php

You also might want to look at W3C - JavaScript Screen, Navigator and Window Objects.

http://www.w3schools.com/js/js_ex_browser.asp

Cheers!

Re: Php script to view computers hardware information

Posted: Thu May 06, 2010 7:49 pm
by mecha_godzilla
As has already been suggested, you need something client-side to do this. In addition to JavaScript, have you thought about using a Java applet or Active-X control?

M_G