title: Get the list of ODBC Data Sources using PHP from windows PC
body: <p>How to get the list of all ODBC data sources available in my windows pc using PHP. I have tried using the below code. But getting empty. Could you please help.</p>
  
  <pre><code>    define('HKEY_LOCAL_MACHINE', 0x80000002); 
      $computer = '.'; 
      $reg = new COM("winmgmts:{impersonationLevel=impersonate}\\\\" . $computer . "\\root\\default:StdRegProv"); 
  
      $key_path = 'SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers'; 
      $sub_keys = array();
      $reg-&gt;EnumKey(HKEY_LOCAL_MACHINE, $key_path, $sub_keys); 
  
      foreach($sub_keys as $sub_key){ 
          echo $sub_key; 
      }
  </code></pre>