How to determine the current version of IIS using PHP?

Now my approach ...

if ( preg_match( '~IIS/(\d+\.\d+)~', $_SERVER['SERVER_SOFTWARE'], $matches ) ) $version = $matches[1]; 

... but I have no experience with IIS, and after some searching, I did not find any information on how reliable it is. The signature of the server may be suppressed, or the template may be changed in older versions or with additional software.

Is it possible to determine the full version of IIS with PHP? Perhaps with extensions only for Windows ? Are there any pitfalls I should know about?

+6
source share
1 answer

since I know that the structure of the version of IIS Is Fix is ​​similar to this

  Microsoft-IIS/5.0 (Windows 2000) Microsoft-IIS/5.1 (Windows XP) Microsoft-IIS/6.0 (Windows 2003 Server) 
+1
source

All Articles