Page 1 of 1

Get data from Windows Registry with PHP

Posted: Mon Jun 25, 2007 2:26 am
by siskokid
Good mourning :)

Could anyone help me with the following task:

I need to drag some information of the Windows' Registry using PHP. I need the following:

IP Address, DNS Address, DNS Suffix and DHCP.

These variables are located under:

SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces

Could you please help me with a sample of code :)

I know how to do it with VBScript. So in this connection, another valuable piece of help would be to give me a piece of PHP code, which would help me to "implant" my VBScript into the PHP code. I mean, I need the VBScript to be called by the PHP and executed on the fly :)

Any help will be appreciated :)

Best,
siskokid

Posted: Mon Jun 25, 2007 2:29 am
by Benjamin
You can create a form and ask them for the information.

Posted: Mon Jun 25, 2007 2:35 am
by alex.barylski

Posted: Mon Jun 25, 2007 3:35 am
by siskokid
Hi Hockey,

Thanks for the link, but I would rather not use this way (experimental, some functions may not work under different versions of PHP, etc.). I need something robust and general. Could you please help me in another way :)

I will really appreciate the help!

Best,
siskokid

Posted: Mon Jun 25, 2007 5:22 am
by volka

Code: Select all

system('ipconfig /all');

Re: Get data from Windows Registry with PHP

Posted: Mon Jun 25, 2007 5:31 am
by superdezign
siskokid wrote: know how to do it with VBScript. So in this connection, another valuable piece of help would be to give me a piece of PHP code, which would help me to "implant" my VBScript into the PHP code. I mean, I need the VBScript to be called by the PHP and executed on the fly
Can't you use VBScript through <script> tags?

Posted: Mon Jun 25, 2007 5:58 am
by siskokid
Hi volka, hi superdezign :)

I knew about the system() command, but I have to parse the string after I get the result, which also could be a solution. I want to directly get the data instead. Could you please help me with the sintax of the <script> tags, which would allow me to use my VBScript. I am interested in how do you pass a variable through the tags to the VBScript and how do you pass the resulting variable back to PHP.

Thanks in advance,
siskokid

Posted: Mon Jun 25, 2007 6:03 am
by volka
<script type="text/vbscript">, that would be a client-side script and I don't know if any any browser besides internet explorer executes vbscripts. And even the IE will probably not allow arbitrary scripts to access the registry.