发新话题
打印

状态显示IP+真实地址

状态显示IP+真实地址

打开 inc/Board_Popfun.asp

搜索:
End If
Application.Lock
Application(DEF_MasterCookies & "SitePageCount") = Application(DEF_MasterCookies & "SitePageCount") + 1
Application.UnLock  


在下面添加:

dim userinfo1,userinfo2
     userinfo1=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
     if userinfo1="" then userinfo1=Request.ServerVariables("REMOTE_ADDR") end if
     userinfo2=lookaddress(userinfo1)
        function lookaddress(userinfo1)
        dim ip,str1,str2,str3,str4,connIP,address
        ip=userinfo1
        if isnumeric(left(ip,2)) then
        if ip="127.0.0.1" then ip="192.168.0.1" end if
        str1=left(ip,instr(ip,".")-1)
        ip=mid(ip,instr(ip,".")+1)
        str2=left(ip,instr(ip,".")-1)
        ip=mid(ip,instr(ip,".")+1)
        str3=left(ip,instr(ip,".")-1)
        str4=mid(ip,instr(ip,".")+1)
        if isNumeric(str1)=0 or isNumeric(str2)=0 or isNumeric(str3)=0 or isNumeric(str4)=0 then
        lookaddress="未找到数据"
        else
        ip=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1
        set ConnIP=Server.CreateObject("ADODB.Connection")
        ConnIP.Open "driver={Microsoft access Driver (*.mdb)};dbq="&Server.MapPath("/LeadBBS_IPAddress.mdb")
        set address=ConnIP.execute("select country,city from LeadBBS_IPAddress where ip1 <="&ip&" and ip2 >="&ip)
        if not address.EOF and not address.BOF then
        lookaddress=address(0)&address(1)
        end if
        address.close
        set address=nothing
        ConnIP.close
        set ConnIP=nothing
        end if
        else
        lookaddress="未找到数据"
        end if
        end function  



搜索:
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">


在上面添加:

<base onmouseover="window.status='IP地址 <%=userinfo1%>::真实地址 <%=userinfo2%>'">

TOP

看不懂

TOP

?????

TOP

老妈说,不懂不能装懂!

TOP

TOP

TOP

发新话题