%@ LANGUAGE = PerlScript%>
Browser Capabilities
<%
$bc = $Server->CreateObject("MSWC.BrowserType");
sub tf($) {
return $_[0] ? 'True' : 'False';
}
%>
Browser Properties
This example uses the BrowsCap COM component which installs with IIS. To create an instance of a
COM component, you provide the $Server->CreateObject() method with the progID for the component that you
wish to create.
Browser Type | <%= $bc->browser %> |
What Version | <%= $bc->Version %> |
Major Version | <%= $bc->majorver %> |
Minor Version | <%= $bc->minorver %> |
Frames | <%= tf($bc->Frames) %> |
Tables | <%= tf($bc->Tables) %> |
Cookies | <%= tf($bc->cookies) %> |
Background Sounds | <%= tf($bc->BackgroundSounds) %> |
VBScript | <%= tf($bc->VBScript) %> |
JavaScript | <%= tf($bc->Javascript) %> |
<%
$url = $Request->ServerVariables('PATH_INFO')->item;
$_ = $Request->ServerVariables('PATH_TRANSLATED')->item;
s/[\/\\](\w*\.asp\Z)//m;
$params = 'filename='."$1".'&URL='."$url";
$params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg;
%>
Return
view the source