<!--#if expr="$HTTP_USER_AGENT = /6.\(.*\)/" --> <H2>You are using a browser with version number 6.xx</H2> <!--#elif expr="$HTTP_USER_AGENT = /5.\(.*\)/" --> <H2>You are using a browser with version number 5.xx</H2> <!--#elif expr="$HTTP_USER_AGENT = /4.\(.*\)/" --> <H2>You are using a browser with version number 4.xx</H2> <!--#elif expr="$HTTP_USER_AGENT = /3.\(.*\)/" --> <H2>You are using a browser with version number 3.xx</H2> <!--#elif expr="$HTTP_USER_AGENT = /2.\(.*\)/" --> <H2>You are using a browser with version number 2.xx</H2> <!--#else --> <H2>I don't know what you're using</H2> <!--#endif --> Your HTTP_USER_AGENT = <!--#echo var="HTTP_USER_AGENT" -->This outputs:
<!--#if expr="$HTTP_USER_AGENT = /Windows NT 5.1/ && $HTTP_USER_AGENT = /MSIE/" --> <H2>You are using Windows XP and MS I.E. 6.0</H2> <!--#elif expr="$HTTP_USER_AGENT = /Linux/ && $HTTP_USER_AGENT = /Gecko/" --> <H2>You are using Linux and some Netscape 6.x/7. or Mozilla variant</H2> <!--#elif expr="$HTTP_USER_AGENT = /Win/ && $HTTP_USER_AGENT = /MSIE/ && $HTTP_USER_AGENT = /4./" --> <H2>You are using MS Windows and MS I.E. 4.0</H2> <!--#elif expr="$HTTP_USER_AGENT = /Win/ && $HTTP_USER_AGENT = /MSIE/" --> <H2>You are using MS Windows and a pre 4.0 version of MS I.E.</H2> <!--#elif expr="$HTTP_USER_AGENT = /Win/ && $HTTP_USER_AGENT != /ompatible/ && ( $HTTP_USER_AGENT = /4./ )" --> <H2>You are using MS Windows and Netscape 4.0</H2> <!--#elif expr="$HTTP_USER_AGENT = /Win/ && $HTTP_USER_AGENT != /ompatible/ && ( $HTTP_USER_AGENT = /3./ )" --> <H2>You are using MS Windows and Netscape 3.0</H2> <!--#elif expr="$HTTP_USER_AGENT = /Win/ && $HTTP_USER_AGENT != /ompatible/" --> <H2>You are using MS Windows and pre-3.0 Netscape</H2> <!--#elif expr="$HTTP_USER_AGENT = /ac/ && $HTTP_USER_AGENT = /MSIE/" --> <H2>You are using Macintosh and MS I.E.</H2> <!--#elif expr="$HTTP_USER_AGENT = /ac/ && $HTTP_USER_AGENT != /ompatible/" --> <H2>You are using Macintosh and Netscape</H2> <!--#else --> <H2>I don't know what you're using</H2> <!--#endif -->This outputs:
Other resources: