> Sorry about the OT post but I am a little stumped. I was wondering if
anyone
> out there knows how to find out the following information about visitors
to
> a web site:
>
> Screen Resolution: (ie. 1024x768, 800x600)
>
> Color Depth: (ie. 16-bit, 32-bit, 256 colors, etc...)


For screen resolution and color depth you can use this javascript snippet
(works in "both" browsers)....

<~~~~~~~~~~~~~SNIP~~~~~~~~~~~~~>
<script language="JavaScript"><!--
function GetSysInfo() {
window.onerror=null;
if(navigator.javaEnabled() && (navigator.appName != "Microsoft Internet
Explorer"))

{
vartool=java.awt.Toolkit.getDefaultToolkit();
addr=java.net.InetAddress.getLocalHost();
host=addr.getHostName();
ip=addr.getHostAddress();
alert("Your host name is: \'" + host + "\'\nIt\'s IP adress is: " + ip);
}

colors = window.screen.colorDepth;
document.InfoForm.color.value = Math.pow (2, colors);

if (window.screen.fontSmoothingEnabled == true)
 {document.InfoForm.fsmooth.value = "Yes"; }
else {document.InfoForm.fsmooth.value = "No";}

document.InfoForm.browser.value = navigator.appName;
document.InfoForm.version.value = navigator.appVersion;
document.InfoForm.colordepth.value = window.screen.colorDepth;
document.InfoForm.width.value = window.screen.width;
document.InfoForm.height.value = window.screen.height;
document.InfoForm.AppCode.value = navigator.appCodeName;
document.InfoForm.platform.value = navigator.platform;

   if (navigator.javaEnabled() < 1) {
         document.InfoForm.java.value="No";
      }

   if (navigator.javaEnabled() == 1) {
      document.InfoForm.java.value="Yes";
       }

}
// -->
</script>

</head>
<body onload="GetSysInfo()">
<form name="InfoForm">
    Current resolution<br>
    <input type="text" size="4" maxlength="4" name="width"> x <input
type="text" size="4" maxlength="4" name="height"><br>
 Browser:<br>
 <input type="text" size="38" maxlength="38" name="browser"><br>
 Version:<br>
 <input type="text" size="38" maxlength="38" name="version"><br>
 Color depth:<br>
    <input type="text" size="2" maxlength="2" name="colordepth"> bit<br>
 Code:<br>
 <input type="text" size="15" maxlength="15" name="AppCode"><br>
 Plataform:<br>
 <input type="text" size="15" maxlength="15" name="platform"><br>
 Colors:<br>
    <input type="text" size="8" maxlength="8" name="color"><br>
 Java enabled:<br>
    <input type="text" size="2" maxlength="2" name="java"><br>
 Anti-aliasing fonts:<br>
    <input type="text" size="2" maxlength="2" name="fsmooth"><br>
 <input type="button" name="B1" value="Again?" onclick="GetSysInfo()">
</form>
<~~~~~~~~~~~~~SNIP~~~~~~~~~~~~~>

As far as HTTP referral goes, I assume you are using CF since you are
posting to the CF-Talk list, so you can use the CGI variable HTTP_REFERER,
which will give you the URL of the referring page....

HTH,
Steve



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to