Wizard_IT
asked on
Windows Environment Variable Extraction to HTML / WEB
We are making a simple HTML website.
We need to extract Windows Environment variables (Ie the ones set is Computer - Properties)
The variable we have set at dos level is called storename
We would also like to retrieve the IP Address and Default gateway of the PC
If we need to store these in environment variables too we will
Thanks in advance
We need to extract Windows Environment variables (Ie the ones set is Computer - Properties)
The variable we have set at dos level is called storename
We would also like to retrieve the IP Address and Default gateway of the PC
If we need to store these in environment variables too we will
Thanks in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The php solution can be easily adapted to any decent scripting language, but this still wouldn't give you CLIENT details, just server details.
ASKER
Thanks qualding!!!
I uploaded a test page online containing the script you suggested and when browsing to the page i receive the following:
"Warning: exec() has been disabled for security reasons in /home/jay/public_html/inde x.php on line 13
Warning: Invalid argument supplied for foreach() in /home/jay/public_html/inde x.php on line 14
The storename is undefined The IP Address is The Default Gateway is "
the url of the page is "unusualsuspex.wmn.cc/inde x.php" if you want to take a look at source code
please help, i really need to get this working for monday!
Thanks in advance.
I uploaded a test page online containing the script you suggested and when browsing to the page i receive the following:
"Warning: exec() has been disabled for security reasons in /home/jay/public_html/inde
Warning: Invalid argument supplied for foreach() in /home/jay/public_html/inde
The storename is undefined The IP Address is The Default Gateway is "
the url of the page is "unusualsuspex.wmn.cc/inde
please help, i really need to get this working for monday!
Thanks in advance.
The first error of "Warning: exec() has been disabled for security reasons in /home/jay/public_html/inde x.php on line 1", means that your ISP has disabled the ability for you to run external applications. Even such things as ipconfig.
This is a security setting made by the ISP and as such there is no work around using PHP. You could try using Perl (no idea what to code), but I suspect Perl has a similar mechanism on restrictions.
This is a security setting made by the ISP and as such there is no work around using PHP. You could try using Perl (no idea what to code), but I suspect Perl has a similar mechanism on restrictions.
If it is the client's you want, then you will have to either ask them very nicely to enter it into a form or construct a java or activex app to get them (and there may be limits as to what you can get hold of).
Client side JS cannot access this info.