主题:  怎样在主页中显示包括用户IP,浏览器版本,操作系统等信息?

零度沸腾

职务:普通成员
等级:1
金币:1.0
发贴:262
注册:2003/1/15 11:32:12
#12004/3/20 2:37:45
怎样在主页中显示包括用户IP,浏览器版本,操作系统等信息?
我是用ASP中的Request对象,但是老是不成功,有没有高手贴出来看看
<%=request.servervariables(remote_addr)%>显示IP的,但是不成功



UC无限概念 站长

职务:普通成员
等级:2
金币:1.0
发贴:397
注册:2003/3/2 14:56:31
#22004/3/20 13:22:00
浏览器版本:
<script language="javascript">
<!--
document.write("您使用的浏览器是:<br>"+navigator.appName+" "+navigator.appVersion);
//-->
</script>
客户端软件使用情况
thesoft=Request.ServerVariables("HTTP_USER_AGENT"
' 浏览器
if instr(thesoft,"NetCaptor" then
    vsoft="NetCaptor"
elseif instr(thesoft,"MSIE 6" then
    vsoft="MSIE 6.x"
elseif instr(thesoft,"MSIE 5" then
    vsoft="MSIE 5.x"
elseif instr(thesoft,"MSIE 4" then
    vsoft="MSIE 4.x"
elseif instr(thesoft,"Netscape" then
    vsoft="Netscape"
elseif instr(thesoft,"Opera" then
    vsoft="Opera"
else
    vsoft="Other"
end if
' 操作系统
if instr(thesoft,"Windows NT 5.0" then
    vOS="Win 2000"
elseif instr(thesoft,"Windows NT 5.1" then
    vOs="Win XP"
elseif instr(thesoft,"Windows NT" then
    vOs="Win NT"
elseif instr(thesoft,"Windows 9" then
    vOs="Win 9x"
elseif instr(thesoft,"unix" or instr(thesoft,"linux" or instr(thesoft,"SunOS" or instr(thesoft,"BSD" then
    vOs="类Unix"
elseif instr(thesoft,"Mac" then
    vOs="Mac"
else
    vOs="Other"
end if
'屏幕宽度
vwidth=Request("screenwidth"


' 访问者所在地区
' 从独立数据库读取IP信息
set connip=server.createobject("adodb.connection"
DBPath = Server.MapPath(ipconnpath)
connip.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath

ipnow=cip(vip)

Set rsip = Server.CreateObject("ADODB.Recordset"
sql="select * from ip where (onip<=" & ipnow & " and offip>=" & ipnow & ""
rsip.Open sql,connip,1,1

if rsip.EOF then
    vwhere="未知"
    vwheref=""
else
    vwhere=rsip("addj"
    vwheref=rsip("addf"
end if
rsip.Close
set rsip=nothing
connip.Close
set connip=nothing



零度沸腾

职务:普通成员
等级:1
金币:1.0
发贴:262
注册:2003/1/15 11:32:12
#32004/3/20 21:49:50
你好厉害啊!你的那个OLEDB链接方式是不是直接在DU中输入就可以,还是也是和ODBC一样需要先安装ACCESS驱动程序?



UC无限概念 站长

职务:普通成员
等级:2
金币:1.0
发贴:397
注册:2003/3/2 14:56:31
#42004/3/21 21:56:54
前者



UC无限概念 站长

职务:普通成员
等级:2
金币:1.0
发贴:397
注册:2003/3/2 14:56:31
#52004/3/21 21:58:33
以后有贴子也上我的论坛上发点吧,UC无限概念论坛,欢迎你