My approach now is …
if ( preg_match( '~IIS/(\d+\.\d+)~', $_SERVER['SERVER_SOFTWARE'], $matches ) )
$version = $matches[1];
… but I have no experience with IIS, and after searching for a while I found no information how reliable that is. The server signature might be suppressed, or the pattern might be changed in older versions or by additional software.
Is it possible to detect the full correct IIS version with PHP? Maybe with the Windows only extensions? Are there any pitfalls I should be aware of?
Using Run CommandSelect windows +R key and type inetmgr and press OK. It will open the IIS manager window . In the same way go to Help ->About Internet Information Services and you will get the version installed on your computer.
The fastest and easiest way to install PHP on Internet Information Services (IIS) is by using the Microsoft® Web Platform Installer (Web PI). Web PI completely automates setting up IIS, FastCGI, and the latest version of PHP from the php.net Web site.
IIS 10.0 version 1809 a.k.a. version 10.0. 17763 is included in Windows Server 2019 and Windows 10 October Update released 2018-10-02.
as I know the structure of IIS Version Is Fix like this
Microsoft-IIS/5.0 (Windows 2000)
Microsoft-IIS/5.1 (Windows XP)
Microsoft-IIS/6.0 (Windows 2003 Server)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With