ip地址转换
你在自己的机子上运行一下,看是否来回转换都准确?
<%
strUserIP=request("remote_addr")
arrUserIP=split(strUserIP,".")
longUserIP=int(arrUserIP(3))+int(arrUserIP(2))*255+int(arrUserIP(1))*255*255+int(arrUserIP(0))*255*255*255
response.Write(longUserIP)
numIP=longUserIP
ip1=numIP mod 255
numip=int(numIP/255)
ip2= numIP mod 255
numip=int(numIP/255)
ip3= numIP mod 255
numip=int(numIP/255)
ip4= numIP mod 255
dotIP= ip4 & "." & ip3 & "." & ip2 & "." & ip1
response.Write("<br>" & dotIP)
%>