hackalive Posted March 26, 2010 Share Posted March 26, 2010 Hi guys, I am on the hunt for some code or method (that then I can write the code) that will allow me to do the following. When someone visits mysite.com (as an example) I want it to trigger some code on a server (OS non specific) that then retrieves and displays to the user on the webbrowser the servers hard drive serial number, etc Any help is much appreciated, thanks in advance Quote Link to comment Share on other sites More sharing options...
hackalive Posted March 26, 2010 Author Share Posted March 26, 2010 any ideas? Quote Link to comment Share on other sites More sharing options...
oni-kun Posted March 26, 2010 Share Posted March 26, 2010 any ideas? system an hdparm or fdisk result? Why do you wish to do that? Quote Link to comment Share on other sites More sharing options...
hackalive Posted March 27, 2010 Author Share Posted March 27, 2010 I should clarify I actually want it to go into a PHP variable not display to person browsing Quote Link to comment Share on other sites More sharing options...
trq Posted March 27, 2010 Share Posted March 27, 2010 See oni-kun's post. Quote Link to comment Share on other sites More sharing options...
hackalive Posted March 27, 2010 Author Share Posted March 27, 2010 I need a solution that works on Windows and Linux (but Windows to start with) Quote Link to comment Share on other sites More sharing options...
trq Posted March 27, 2010 Share Posted March 27, 2010 system works on both windows and Linux. If your question is where to get this information from, then your question is completely unrelated to php. Quote Link to comment Share on other sites More sharing options...
hackalive Posted March 27, 2010 Author Share Posted March 27, 2010 The question is how to obatin information such as hdd serial number, MAC address, CPU serial number etc from the server and place them in PHP variables that then can be used for licensing checks Quote Link to comment Share on other sites More sharing options...
trq Posted March 27, 2010 Share Posted March 27, 2010 And the answer is, you will need to use system to execute OS specific commands which retrieve said data and save it into a variable. eg; $hdd = system($hddcmd); $serial = system($serialcmd); The contents of both $hddcmd and $serialcmd are not within the scope of php. Quote Link to comment Share on other sites More sharing options...
hackalive Posted March 27, 2010 Author Share Posted March 27, 2010 ANy where I can obtain a list of these OS specific commands? Quote Link to comment Share on other sites More sharing options...
trq Posted March 27, 2010 Share Posted March 27, 2010 Like I said, that question has nothing to do with php. Most of the data you are looking for will likely be within the /proc directory or the output of ifconfig on Linux. I'm not a windows user so wouldn't even know where to start with it. Quote Link to comment Share on other sites More sharing options...
greatstar00 Posted March 27, 2010 Share Posted March 27, 2010 if you want to test out those command on your computer go start, run, type "cmd"(without quotes) and on the dos window, type those command u like they are the same in $cmd of system("$cmd") but if u want to execute a program, your php will hang, because no result will produce, and php keeps waiting it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.