Browscap ISAPI-Filter für IIS
Browscap ISAPI-Filter für IIS
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 
The Free Pascal source for the Filter:

 browscap_filter.lpr 
Config file for the ISAPI-Filter (browscap_filter.Ini):
[browscap]path=C:.inilogpath=C:
debug=1[fields]X-Client-Name=BrowserX-Client-Version=VersionX-Client-Is-Mobile-Device=isMobileDeviceX-Client-Is-Tablet=isTabletX-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.014: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=0Connection: keep-aliveAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Encoding: gzip, deflateAccept-Language: de-de,de;q=0.7,en-us;q=0.3Cookie: ASPSESSIONIDAQQSDBSS=FBKBCEDCKLICGFBEMGGHBNFFHost: test.localhostUser-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0DNT: 1X-Client-Name: FirefoxX-Client-Version: 29.0X-Client-Is-Mobile-Device: falseX-Client-Is-Tablet: falseX-Client-Is-Crawler: falseName: FirefoxVersion: 29.0Mobile: falseTablet: falseCrawler: false