An ISAPI-Filter to use the browscap.ini File Values on the IIS, with any programming language.
All you must have to run it:
browscap_filter.zip (99,97 kByte) 30.12.2018 21:29
The Free Pascal source for the Filter:
Config file for the ISAPI-Filter (browscap_filter.Ini):
[browscap]
path=C:\inetpub\browscap.ini
logpath=C:\inetpub\logging\
debug=1
[fields]
X-Client-Name=Browser
X-Client-Version=Version
X-Client-Is-Mobile-Device=isMobileDevice
X-Client-Is-Tablet=isTablet
X-Client-Is-Crawler=Crawler
Logfile Lines for one request, if debug=1:
14:40:37:973|User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
14:40:38:051|add header(X-Client-Name: Firefox)
14:40:38:051|add header(X-Client-Version: 29.0)
14:40:38:051|add header(X-Client-Is-Mobile-Device: false)
14:40:38:051|add header(X-Client-Is-Tablet: false)
14:40:38:051|add header(X-Client-Is-Crawler: false)
ASP (VB-Script) Example:
<%
Response.Write(Replace(Request.ServerVariables("ALL_RAW"), vbCrLf, "<br />") + "<br />")
Response.Write("Name: " + Request.ServerVariables("HTTP_X_CLIENT_NAME") + "<br/>")
Response.Write("Version: " + Request.ServerVariables("HTTP_X_CLIENT_VERSION") + "<br/>")
Response.Write("Mobile: " + Request.ServerVariables("HTTP_X_CLIENT_IS_MOBILE_DEVICE") + "<br />")
Response.Write("Tablet: " + Request.ServerVariables("HTTP_X_CLIENT_IS_TABLET") + "<br />")
Response.Write("Crawler: " + Request.ServerVariables("HTTP_X_CLIENT_IS_CRAWLER") + "<br />")
Output:
Cache-Control: max-age=0
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: de-de,de;q=0.7,en-us;q=0.3
Cookie: ASPSESSIONIDAQQSDBSS=FBKBCEDCKLICGFBEMGGHBNFF
Host: test.localhost
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
DNT: 1
X-Client-Name: Firefox
X-Client-Version: 29.0
X-Client-Is-Mobile-Device: false
X-Client-Is-Tablet: false
X-Client-Is-Crawler: false
Name: Firefox
Version: 29.0
Mobile: false
Tablet: false
Crawler: false