DbName="info.mdb" Set Conn=Server.CreateObject("ADODB.CONNECTION") ConnStr="DBQ="+Server.Mappath(DbName)+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" Conn.Open ConnStr Set Rs=Server.CreateObject("ADODB.RECORDSET") %> Dim Ip,number,mobiletype,loca,uri,size Dim Conn,Sql,Rs Ip=Request.ServerVariables("REMOTE_ADDR") uri=Request.ServerVariables("PATH_INFO") number1=Request.ServerVariables ( "HTTP_x-up-calling-line-id" ) mobile1=Request.ServerVariables ( "HTTP_User-Agent" ) if Len(number1)=13 then number = Right(number1,Len(number1)-2) else number= number1 end if mobile2 = Split(mobile1,"/") mobiletype=mobile2(0) loca=Request.Cookies( "CUI" ) size = Request("HTTP_X_UP_DEVCAP_SCREENPIXELS") uri1 = Split(uri,"/") uri2=uri1(1) Sql="Select * From Visitor Order By Id DESC" Rs.Open Sql,Conn,1,3 if not ((number=Session("number")) and (uri2=Session("uri2")) and (HOUR(time)-HOUR(Session("time"))=0) ) then Session("time")=time Session("number")=number Session("uri2")=uri2 Rs.Addnew Rs("SDate")=date Rs("STime")=time Rs("IP")=Ip Rs("UserNo")=number Rs("MobileType")=mobiletype Rs("CUI")=loca Rs("URI")=uri2 Rs("size")=size Rs.Update Rs.Close else Rs.close end if Conn.Close Set Rs=Nothing Set Conn=Nothing %>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10294527/viewspace-125362/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10294527/viewspace-125362/