龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > asp编程 >

静态页面统计代码

时间:2012-12-31 22:56来源:未知 作者:admin 点击:
分享到:
静态页面统计代码 % If Not IsNumeric(Request(id)) And Request(id) then Response.write错误的系统参数!ID必须是数字 Response.End End If Dim theurl,id,strStation id = CInt(Request.Querystring(id)) strStation = Left(Request.Se

静态页面统计代码

<%
If Not IsNumeric(Request("id")) And Request("id")<>"" then
 Response.write"错误的系统参数!ID必须是数字"
 Response.End
End If
Dim theurl,id,strStation
id = CInt(Request.Querystring("id"))
strStation = Left(Request.ServerVariables("HTTP_REFERER"),220)
theurl="http://" & Request.ServerVariables("http_host") & finddir(Request.ServerVariables("url"))
%>
document.write("<script>var url='<%=theurl%>';</script>")
_dwrite("<script language=javascript src="+url+"/inc/online.asp?id=<%=id%>&stat=<%=strStation%>&Referer="+escape(document.referrer)+"></script>");
function _dwrite(string) {document.write(string);}
<%
Function finddir(filepath)
 finddir=""
 Dim i,abc
 for i=1 to len(filepath)
  if left(right(filepath,i),1)="/" or left(right(filepath,i),1)="" then
     abc=i
     exit for
  end if
 next
 if abc <> 1 then
  finddir=left(filepath,len(filepath)-abc+1)
 end if
end Function
%>


收藏文章
表情删除后不可恢复,是否删除
取消
确定
图片正在上传,请稍后...
评论内容为空!
还没有评论,快来抢沙发吧!

热评话题

按钮 内容不能为空!
立刻说两句吧! 查看0条评论
精彩图集

赞助商链接