PDA

View Full Version : Connecting to wmi with php to get DNS records



SameerMirza
10-13-2009, 03:50 PM
Hi all,
I am trying to make a wmi connection to a machiene and get the DNS record, using the following but it gives me the following error,

Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `winmgmts:{impersonationLevel=impersonate}//./root/MicrosoftDNS': ' in C:\Inetpub\wwwroot\reports\process_check.php:3 Stack trace: #0 C:\Inetpub\wwwroot\reports\process_check.php(3): com->com('winmgmts:{imper...') #1 {main} thrown in C:\Inetpub\wwwroot\reports\process_check.php on line 3

I am following the code provided on the expert-exchange (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Windows/Q_21638652.html).

Can any one please help out with it? Or reffer any other help full link.

Regards,

Sameer.