Php script to view computers hardware information

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
xionhack
Forum Contributor
Posts: 100
Joined: Mon Nov 10, 2008 9:22 pm

Php script to view computers hardware information

Post 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
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Php script to view computers hardware information

Post 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)?
xionhack
Forum Contributor
Posts: 100
Joined: Mon Nov 10, 2008 9:22 pm

Re: Php script to view computers hardware information

Post by xionhack »

The client accessing via http
User avatar
Apollo
Forum Regular
Posts: 794
Joined: Wed Apr 30, 2008 2:34 am

Re: Php script to view computers hardware information

Post 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.
xionhack
Forum Contributor
Posts: 100
Joined: Mon Nov 10, 2008 9:22 pm

Re: Php script to view computers hardware information

Post by xionhack »

Thats right. Do u know of any way I can accomplish that?
xtiano77
Forum Commoner
Posts: 72
Joined: Tue Sep 22, 2009 10:53 am
Location: Texas

Re: Php script to view computers hardware information

Post 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!
User avatar
mecha_godzilla
Forum Contributor
Posts: 375
Joined: Wed Apr 14, 2010 4:45 pm
Location: UK

Re: Php script to view computers hardware information

Post 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
Post Reply