i want to be able to track clicks even if scripting is disabled, so i wrote the below as a test. it works.
but now, i am not sure i want [U]my
i would like to hear any opinions about the balance of operator control / user rights, as it pertains to the concept.
– do i have a right to monitor usage of my own site?
– do users have a right to privacy on any site?
-the scriptless click ping:
client html
[CODE]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<title>scriptless ping</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<style type=’text/css’>
a { color: blue; }
a.ping { background-image: url(“”); }
a.ping1:visited { background-image: url(“http://192.168.8.2/pub/pinglog.asp?link=noaa.gov”); }
</style>
</head>
<body >
this will ping when you click the link: <a target=”_blank” href=’http://www.noaa.gov/’ class=”ping1″>noaa</a> <br />
</body>
</html>
server jscript (not cut-and-paste ready, but should demo the gist)
[CODE]
<!–#include file=”XXX.asp”–>
<script language=”jscript” runat=”server”>
Response.ContentType=”text/plain”
var dtt = ( new Date() ).toString();
var key=String(Request.querystring(“link”) ) || “” ;
var ipt=String(Request.ServerVariables(“remote_addr”)) || “err”;
var uat=String(Request.ServerVariables(“http_user_agent”)) || “err”;
var buff= ({ dt: dtt,
ua :uat,
ip :ipt,
link:key});
print( apFile(“pinglog.txt” , buff.toSource() + “,rn” ) )
</script>
example of log file:
[CODE]
({dt:”Mon Jul 21 22:17:43 CDT 2008″, ua:”Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.1) Gecko/2008070208 [COLOR=”Red”]Firefox/3.0.1[/COLOR]”, ip:”192.168.8.3″, link:”noaa.gov”}),
({dt:”Mon Jul 21 22:20:28 CDT 2008″, ua:”Mozilla/4.0 (compatible; [COLOR=”Red”]MSIE [/COLOR]7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)”, ip:”192.168.8.3″, link:”noaa.gov”}),
({dt:”Mon Jul 21 22:30:36 CDT 2008″, ua:”Mozilla/5.0 (Windows; U; Windows NT 6.0; en) AppleWebKit/522.15.5 (KHTML, like Gecko) Version/3.0.3 [COLOR=”Red”]Safari[/COLOR]/522.15.5″, ip:”192.168.8.3″, link:”noaa.gov”}),
({dt:”Mon Jul 21 22:29:10 CDT 2008″, ua:”Mozilla/5.0 (Windows NT 6.0; U; en; rv:1.8.0) Gecko/20060728 Firefox/1.5.0 [COLOR=”Red”]Opera [/COLOR]9.23″, ip:”192.168.8.3″, link:”noaa.gov”}),
do no evil!